2 ms·
OP was talking about trading [] for {}. You can't splice on {}.
by sametmax 9y ago
OP was talking about trading [] for {}. You can't splice on {}.
- simplicitea 9y agowell, objects are not iterables... ??? unless you decide you want them to be, in which case you can make them such and design them in a way that they work as such? The least elegant way is Object.keys().map(key => etc) which is really not that hard to work with edit: it's a phony premise to begin with actually. Iterables have order, objects have mapping. I am less experienced with other languages so I probably don't understand OP's statement clearly. I just think OP's context is lazy thought rot about what's becoming a fairly elegant language. BUT I'm a noob.