JavaScript: Map.prototype.size

By Xah Lee. Date: . Last updated: .

New in JS2015.

map_obj.size
Return the total count of entries in map_obj.
console.log(
(new Map([[3, "n3"], [4, "n4"]])).size === 2
);
// true
BUY
ΣJS
JavaScript in Depth

JS Obj Reference

Map

prototype