Skip to content
Subhajit Sahu edited this page Dec 2, 2022 · 15 revisions

Find the size of a set.

Similar: size, isEmpty.


function size(x)
// x: a set
const set = require('extra-set');

var x = new Set([1, 2, 3]);
set.size(x);
// → 3


References

Clone this wiki locally