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

Jorge jorge at jorgechamorro.com
Wed Nov 9 12:40:32 PST 2011


On 08/11/2011, at 22:17, John J Barton wrote:
> Just as a point of comparison, I use this form:
>   Object.keys(o).forEach( function(key) {
>      body
>   });

By the way, isn't that above a(nother) good use case for a goto, given that there's no (easy) way to break out of a forEach 'loop' ?
-- 
Jorge.


More information about the es-discuss mailing list