3 ms·
Yes, most of the confusion is the author's misunderstanding of how arrays work in JS, combined with his tool not showing everything he put into the array. Ther
by gambler 13y ago
Yes, most of the confusion is the author's misunderstanding of how arrays work in JS, combined with his tool not showing everything he put into the array.
There is nothing in the post that shows that author doesn't know how arrays are represented internally. Moreover, whether or not he does is largely irrelevant. He shows clear examples of bad language design, and they remain such whether you're aware of the inner workings of the language or not.
JavaScript's arrays have issues that span far beyond mere "string representation". For example, you can't safely use for...in construct to iterate over items in an array.
- cristiantincu 13y agoThe `for … in` statement iterates over the enumerable properties of an object¹. It’s not for arrays. 1. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for...in https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...