JavaScript: Set.prototype.size

By Xah Lee. Date: . Last updated: .

New in JS2015.

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

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

BUY ΣJS JavaScript in Depth