ES6 - Collections Set Property Size


Advertisements


Returns the number of values in the Set object.

Syntax

Myset.size

Example

var mySet = new Set('tom','jim','jack'); 
var tot = mySet.size; 
console.log(tot);

Output

3 

es6_collections.htm

Advertisements
E-Books Store