JS: Set.prototype.clear
(new in JS: ECMAScript 2015)
mySet.clear()-
- Delete all values of the set mySet.
- Return undefined.
const xx = new Set([3, 4, 5]); console.log(xx.clear() === undefined); console.log(xx.size === 0);
(new in JS: ECMAScript 2015)
mySet.clear()const xx = new Set([3, 4, 5]); console.log(xx.clear() === undefined); console.log(xx.size === 0);