On Tue, Nov 8, 2011 at 1:45 PM, Timmy Willison <timmywill...@gmail.com> 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. > http://jsperf.com/hasownproperty-vs-for-in/4#c300
Added case Object.keys().forEach: http://jsperf.com/hasownproperty-vs-for-in/7 Of course results depend more on browser than form of the loop... jjb _______________________________________________ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss