JS: Map.prototype.size

By Xah Lee. Date: . Last updated: .

(new in JS: ECMAScript 2015)

mapObj.size
Return the total count of entries in mapObj.
(new Map([[3, "n3"], [4, "n4"]])).size === 2

JS Map.prototype