3 ms·
Aren't JavaScript objects supposed to be unordered sets? Why is that example equivalent to `foo.color('blue').suffix('singular').barCollection.color('green').su
by politician 15y ago
Aren't JavaScript objects supposed to be unordered sets? Why is that example equivalent to `foo.color('blue').suffix('singular').barCollection.color('green').suffix('plural')`? (Is it?)
- raganwald 15y agoThey are unordered. For certain types of updates, the order is immaterial and a hash of attributes could be applied. On the other hand, if you are mutating a tree as you go along, the order is important and you want to call methods and/or functions to traverse and apply side-effects.