Removes all values from the Set.
- Category: JS Set Reference — part of the JavaScript Tutorial on GoCareerGo
- Read the short summary above, then check the linked docs for full syntax/behaviour
- Interview tip: be ready to explain "Set.prototype.clear()" in one sentence, then back it up with a tiny example
// Set.prototype.clear() — minimal example
console.log("Set.prototype.clear()");Tip
Quick recall: "Set.prototype.clear()" — removes all values from the Set.