JS: Map.prototype.entries
(new in JS: ECMAScript 2015)
mapObj.entries()-
- Return a Generator for the map.
- Each yield is a array of the form
[key, value].
Map.prototype.entriesis the same asMap.prototype[Symbol.iterator]- This means, map object itself is already iterable using exactly the same iterator.
- So this method is redundant.
console.log(Map.prototype.entries === Map.prototype[Symbol.iterator]);
JS Map.prototype
- JS: Map.prototype.constructor
- JS: Map.prototype.size
- JS: Map.prototype[Symbol.toStringTag]
- JS: Map.prototype.get
- JS: Map.prototype.set
- JS: Map.prototype.has
- JS: Map.prototype.delete
- JS: Map.prototype.clear
- JS: Map.prototype.forEach
- JS: Map.prototype.keys
- JS: Map.prototype.values
- JS: Map.prototype.entries