3 ms·
I've searched but can't find the answer... Do they maintain insertion order?
by adsense_banned 12y ago
I've searched but can't find the answer... Do they maintain insertion order?
- shawnz 12y agoYep. In the ES6 draft: > forEach calls callbackfn once for each key/value pair present in the map object, in key insertion order. https://people.mozilla.org/~jorendorff/es6-draft.html#sec-map.prototype.foreach https://people.mozilla.org/~jorendorff/es6-draft.html#sec-ma...
- masklinn 12y agoThey do, which is why you have to give it an iterator.