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]

JS in Depth
XAH  BUY NOW

JS in Depth

JS Obj Ref

DOM


JS Obj Ref

Set

prototype