3 ms·
Of course you could already use prototype-less objects as maps (Object.create(null))
by masklinn 12y ago
Of course you could already use prototype-less objects as maps (Object.create(null))
- satori99 12y agoYou are still forced to use strings as keys with object hashes. Maps allows object keys, which could be really handy in many situations.
- masklinn 12y agoAbsolutely, that was a comment on the title more than on ES6 maps (which are great news, and have plenty of "map" features which ES objects don't provide: https://news.ycombinator.com/item?id=8152850 https://news.ycombinator.com/item?id=8152850)