Set

noun

say it: “SET” /sɛt/

A JavaScript collection that keeps each value only once, ignoring duplicates.

What is Set in JavaScript?

Set — A collection with no duplicates and no set order.

const tags = new Set(["javascript", "web"]);

In a sentence

  • “A Set answers has("tea") quickly, however many items it holds.”
  • “Putting the tags in a Set removed the second "vegan".”

Level: Freelancer · More JavaScript terms at this level

Updated

In other subjects