🌐
W3Schools
w3schools.com › js › js_set_methods.asp
JavaScript Set Methods
A Set has no keys, so the entries() method returns [value,value]. This makes Sets compatible with Maps. // Create a Set const letters = new Set(["a","b","c"]); // Get all Entries const myIterator = letters.entries(); // List all Entries let text = ""; for (const entry of myIterator) { text += entry; } Try it Yourself »
🌐
Mozilla
developer.mozilla.org › en-US › blog › javascript-set-methods
New JavaScript Set methods - MDN Web Docs - Mozilla
June 24, 2024 - Since Firefox 127, these methods are available in most major browser engines, which means you won't need a polyfill to make them work everywhere. This article is a good read for people who are new to Set in JavaScript and are looking to find out how to use these new JavaScript methods.
Discussions

New JavaScript Set methods
Excellent - finally we can use Set for more than a "duplicate-detector". I only wish that there were some way for objects to be "equal" without them having to be the exact same instance. Kind of like Java's .equals and .hashCode methods ... Well, I'll keep dreaming ... More on reddit.com
🌐 r/javascript
12
53
July 10, 2024
New JavaScript Set Methods
Maybe one self-contained example w/ a new function you can copy/paste into the console to play around with would be cool · I was mostly using it as a test to see if it worked in Chrome so I could start using it More on news.ycombinator.com
🌐 news.ycombinator.com
38
92
June 26, 2024
[es6] class getters vs. methods: what do you prefer?
ES5 supports getter/setter properties. And you could define them before that as well (ignoring IE) More on reddit.com
🌐 r/javascript
21
9
April 4, 2016
Is there anything that list the methods, classes, etc like the one in vim in this picture?
Imenu Mode can help with that... More on reddit.com
🌐 r/emacs
17
23
October 21, 2016
🌐
Medium
medium.com › @amirakhaled2027 › javascript-set-methods-95e94892703d
JavaScript Set Methods. A set in JavaScript is a collection of… | by Amira Khaled | Medium
June 11, 2024 - There are two primary ways to create sets in JavaScript: ... const mySet = new Set(); // Adding elements mySet.add("John"); mySet.add("Sherlock"); mySet.add("Watson"); mySet.add("Moriarty"); // Duplicate, ignored console.log(mySet); // Output: Set(3) {"John", "Sherlock", "Watson"} Size: The size property returns the number of unique elements in the set. const mySet = new Set([1, 2, 3]); console.log(mySet.size); // Output: 3 · Entries: The entries() method returns an iterator that allows you to loop through each element and its corresponding index in the set.
🌐
W3Schools
w3schools.com › js › js_sets.asp
JavaScript Sets
A JavaScript Set is a collection of unique values.
🌐
web.dev
web.dev › blog › the javascript set methods are now part of baseline
The JavaScript Set methods are now part of Baseline | Blog | web.dev
June 26, 2024 - Simplify your set operations using the following methods: intersection() returns a new set containing elements in both this set and the given set. const odds = new Set([1, 3, 5, 7, 9]); const squares = new Set([1, 4, 9]); console.log(odds.intersection(squares)); // Set(2) { 1, 9 } union() returns a new set containing all elements in this set and the given set. const evens = new Set([2, 4, 6, 8]); const squares = new Set([1, 4, 9]); console.log(evens.union(squares)); // Set(6) { 2, 4, 6, 8, 1, 9 }
🌐
MDN Web Docs
developer.mozilla.org › en-US › docs › Web › JavaScript › Reference › Global_Objects › Set
Set - JavaScript - MDN Web Docs
August 13, 2026 - A set-like object is an object that provides the following: A size property that contains a number. A has() method that takes an element and returns a boolean.
🌐
Medium
noncodersuccess.medium.com › exploring-javascript-sets-practical-use-cases-and-methods-demystified-deep-dive-into-set-c16a5c5c883f
Exploring JavaScript Sets | Practical Use Cases and Methods Demystified | Deep Dive into Set Methods | JavaScript Set Mastery | by NonCoderSuccess | Medium
April 29, 2024 - A Set has no keys, so the entries() method returns [value,value]. This makes Sets compatible with Maps. ... // Create a Set const letters = new Set(["a","b","c"]); // Get all Entries const myIterator = letters.entries(); // List all Entries let text = ""; for (const entry of myIterator) { text += entry; } Congratulations! You’ve now reached the end of our journey through JavaScript Set Methods.
🌐
Medium
mrabukar.medium.com › mastering-set-methods-in-typescript-javascript-with-examples-7357995e3c96
Mastering Set Methods in TypeScript & JavaScript (with Examples) | by Mr Abukar | Medium
August 24, 2025 - Sets in JavaScript/TypeScript are a powerful tool for handling collections of unique values. With methods like add(), delete(), has(), and advanced operations like union and intersection, they simplify many common programming tasks.
Find elsewhere
🌐
DEV Community
dev.to › zacharylee › 7-new-javascript-set-methods-4737
7 New JavaScript Set Methods - DEV Community
July 13, 2024 - TL;DR: JavaScript’s Set data structure has added 7 new APIs that are very useful and can reduce the need for libraries like lodash.
🌐
Reddit
reddit.com › r/javascript › new javascript set methods
r/javascript on Reddit: New JavaScript Set methods
July 10, 2024 - In any other language a set type without these would be considered incomplete, like an array/list without a method for checking the length or a way to iterate over the elements. ... ES6 sets. Why no intersection? ... Benchmark driven development in JavaScript (Set vs.
🌐
Medium
medium.com › @yateshchhabra › javascript-sets-explained-the-ultimate-guide-for-clean-data-bfb94ec70d5b
JavaScript Sets Explained: The Ultimate Guide for Clean Data | by Yatesh Chhabra | Medium
July 27, 2025 - JavaScript Set Features · Let’s come back to our scraping problem. Suppose we have a list of product IDs like this: const productIds = [101, 102, 103, 102, 101, 104]; We want to remove the duplicates. With Set, it's a one-liner: const uniqueProductIds = [...new Set(productIds)]; console.log(uniqueProductIds); // [101, 102, 103, 104] That’s it. Problem solved. Here’s a quick reference to the most useful Set methods: mySet.add(50); mySet.delete(10); // true if deleted ·
🌐
freeCodeCamp
freecodecamp.org › news › set-and-map-in-javascript
How to Use Set and Map in JavaScript
February 10, 2023 - How to use the has method in a set c. How to use the delete method in a set d. How to use the clear method in a set e. How to use the entries method in a set f. How to use the values method in a set g. How to use the size property in a set h. How to use forEach in a set i.
🌐
EDUCBA
educba.com › home › software development › software development tutorials › javascript tutorial › set in javascript
Set in JavaScript - Methods with Examples | EDUCBA
October 12, 2023 - The values which are in a set can ... we will see some of the available methods of sets set in javascript like add, size, forEach, has, delete and clear....
Address: Unit no. 202, Jay Antariksh Bldg, Makwana Road, Marol, Andheri (East),, 400059, Mumbai
🌐
W3Schools
w3schools.com › jsref › jsref_obj_set.asp
JavaScript Set Reference
altKey (Mouse) altKey (Key) animationName bubbles button buttons cancelable charCode clientX clientY code ctrlKey (Mouse) ctrlKey (Key) currentTarget data defaultPrevented deltaX deltaY deltaZ deltaMode detail elapsedTime elapsedTime eventPhase inputType isTrusted key keyCode location metaKey (Mouse) metaKey (Key) newURL oldURL offsetX offsetY pageX pageY persisted propertyName relatedTarget relatedTarget screenX screenY shiftKey (Mouse) shiftKey (Key) target targetTouches timeStamp touches type which (Mouse) which (Key) view HTML Event Methods
🌐
GeeksforGeeks
geeksforgeeks.org › javascript › sets-in-javascript
Set in JavaScript - GeeksforGeeks
JavaScript’s Set object comes with several built-in methods to add, remove, check, and iterate over values.
Published: September 25, 2025
🌐
Medium
medium.com › just-javascript-tutorials › new-js-set-methods-you-need-to-know-are-now-in-the-browser-510bd0d47a6e
New JS Set Methods You Need To Know Are Now in the Browser | by Dr. Derek Austin 🥳 | Just JavaScript Tutorials | Medium
September 4, 2024 - The intersection method returns a new Set containing elements present in both the original Set and the provided Set. Let’s see it in action. /** * A Set of mapaches' names; the duplicate "Apollo" will be removed.
🌐
MakeUseOf
makeuseof.com › home › programming › 8 javascript set methods you should master today
8 JavaScript Set Methods You Should Master Today
October 30, 2021 - This method accepts the value of the element to add to the Set object as a parameter, and returns the new Set object with added value.
🌐
W3schools
w3schools.dev › js › js_set_methods.asp
JavaScript Set Methods - W3Schools
You can list all Set elements (values) with a for..of loop:
🌐
Hacker News
news.ycombinator.com › item
New JavaScript Set Methods | Hacker News
June 26, 2024 - Maybe one self-contained example w/ a new function you can copy/paste into the console to play around with would be cool · I was mostly using it as a test to see if it worked in Chrome so I could start using it
🌐
Frontend Masters
frontendmasters.com › blog › new-javascript-set-methods
New JavaScript Set methods – Master.dev Blog
const people = ["chris", "chris", "cindy"]; const peopleSet = new Set(people); peopleSet.add("chris"); console.log(peopleSet); // {"chris","cindy"}Code language: JavaScript (javascript) Now they are even more useful with recently universally available methods, as Brian Smith summarizes: