JavaScript Sucks. Variations of Looping Thru Array (2025)
JavaScript Complexity. Why You Have So Many Variations of Looping Thru Array.
Half of them are pitfalls.
- Very annoying property attribute the enumerable.
- It is there because the bad design of no real array type, because arrays are actually just objects with integer as keys.
- so in object keys, you need a way to differentiate the keys that is meant as array index.
- then, the incomptence of object key can only be string type.
- so symbol keys is invented to prevent key collision.
- then, before, the only way to loop thru array is via for-in loop, which has the bad design of going thru all keys in the entire parent chain.
- that is why you have so many variations of looping thru array.
- Half of them are pitfalls.
- full detail, see
JavaScript sucks
Spec Reading
- Reading JavaScript spec notes (2015)
- JavaScript Grammar is Not Context-Free (2016)
- JavaScript Syntax Complexity: Lookahead (2015)
- JavaScript sort, is fragile, and most complex, convoluted (2017)
- JavaScript Spec, Term “instance” is Not Defined (2017)
- JavaScript Spec Change on Date Time Zone Default (2022)
- The term INSTANCE in Object Oriented Programing
sucks
- JavaScript Sucks (2017)
- JavaScript is Truly Bad Language (2025)
- JavaScript Sucks. Variations of Looping Thru Array (2025)
- Xah JavaScript Style Guide for FP
- JavaScript, Write All If Statement as If Expression