打开 微信扫一扫登录
Size属性返回Set对象中的值的数量。
语法:
Myset.size
例:
var mySet = new Set('tom','jim','jack'); var tot = mySet.size; console.log(tot);
输出:
3
推荐手册