New in ES2015.
set_obj.size → returns the total count of values in set_obj.
// size of set const s = new Set([4, 5, 6]); console.log(s.size); // 3
size is a getter property.
[see JS: Getter/Setter Properties]
Liket it? I spend 2 years writing this tutorial. Help me spread it. Tell your friends. Or, Put $5 at patreon.
If you have a question, put $5 at patreon and message me.