Set.prototype.size

The number of elements in a Set object. Read-only.

Syntax

size

Examples

let s = new Set([1, 2, 3])
s.size
3