JS: Map.prototype.values
(new in JS: ECMAScript 2015)
mapObj.values()
-
Return a Generator for the values in the map.
console.log( JSON.stringify( Array.from( (new Map([[3, "n3"], [4, "n4"], [5, "n5"]])).values(), ), ) === `["n3","n4","n5"]`, );
Verify Result is a Generator
// verify the result is iterator and iterable const xx = (new Map([[1, 2], [3, 4]])).values(); // is iterable console.log(Reflect.has(xx, Symbol.iterator)); // true // is iterator console.log(Reflect.has(xx, "next")); // true
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