for own(...) loop (spin-off from Re:, hasOwnProperty(), and inheritance)

Jeremy Ashkenas jashkenas at
Tue Nov 8 13:19:58 PST 2011

On Tue, Nov 8, 2011 at 3:49 PM, Brendan Eich <brendan at> wrote:

>   for own (i in o) {
>     *body*
>   }
> This is a small thing but it might pay off in the long run.

This is a very useful feature ... but for better or for worse, also shows
off how much paren-free would help things. "for own key in object {" reads
well, whereas "for own (key in object) {" reads strangely, because the
adjective "own" naturally belongs next to it's nown "key", without an
interloping lparen.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es-discuss mailing list