JS Sets
Establish rigidly unique data collections strictly destroying any duplicate clones.
A mathematical Set behaves remarkably comparable to an array block, but implements a hyper-aggressive unique-variable structural law: No raw value may ever be replicated or duplicated.
Utilizing the Constructor
To launch a Set, initialize new memory space using the standard new Set() command. Observe below as our code forcefully attempts to insert three identical variables; the internal algorithm brutally crushes the duplicate clones.
Preview
Methods of Extraction
Testing a specific key’s existence proves spectacularly faster referencing a rigid Set structure than linearly scanning an ordinary, sprawling array map using .has().
Preview