The size property of the Set returns the number of elements in it.

    
    const numbers = new Set([1, 2, 3, 4]);

    const numbersSize = numbers.size;

    console.log(numbersSize);
    // 4