clear
const s = new Set([1, 2, 3]) s.clear() console.log(s.size) // β 0
Use Set.clear() to remove all values from the set.
Calling clear() on an already empty Set is safe.
Challenge: Verify that clearing an empty Set doesn't throw.