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

John J Barton johnjbarton at
Tue Nov 8 14:26:01 PST 2011

On Tue, Nov 8, 2011 at 1:45 PM, Timmy Willison <timmywillisn at> wrote:
> Yes, I think JS needs something like this.  This is new to no one here, but
> my main concern with using hasOwnProperty is the loss of performance, so I
> think it would be worth exploring more than just syntactic sugar.  But I
> don't know how realistic it is to hope for that.

Added case Object.keys().forEach:

Of course results depend more on browser than form of the loop...


More information about the es-discuss mailing list