JavaScript: Set.prototype.size

By Xah Lee. Date: . Last updated: .

New in JS2015.

set_obj.size
Return the total count of values in set_obj.
console.log( (new Set([4, 5, 6])).size === 3); 

size is a getter property. [see Getter/Setter Properties]

BUY
ΣJS
JavaScript in Depth

JS Obj Reference

Set

prototype