JavaScript

Set

Definition

A built-in collection that stores unique values of any type. Duplicate values are automatically ignored. Sets provide O(1) add/delete/has operations and are useful for deduplication.

Code Example

Javascript
Tip: Modify the code above and click “Run” to see the results

Learn More

Related Terms