4 ms·
That conversation about for..in - any JS experts that can say whether modules or other new advances will help with this? Not being able to use the standard func
by hirsin 8y ago
That conversation about for..in - any JS experts that can say whether modules or other new advances will help with this? Not being able to use the standard functions on primitives because random other code messes with them sounds like pogo sticking in a minefield.
- tomjakubowski 8y agofor (let x of xs) in more recent versions of JS is how you iterate an array without facing that prototype pollution problem. See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for...of https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...
- hirsin 8y agoGood to know, thanks!