On Tue, Apr 24, 2018 at 9:54 AM, somonek <somo...@gmail.com> wrote: > Hi all, > > Assuming that > > const myObject = { > one: 123, > two: 456, > }; > > could > myObject[in 0] === 'one' // true > > be a better alternative of > Object.keys(myObject)[0] > > and > myObject[in 3] === undefined > > without the need to convert all the object keys into an array, but > directly accessing one. >
Why is this something that warrants extra syntax and not an optimization better left to sufficiently smart engines?
_______________________________________________ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss