🌐
MDN Web Docs
developer.mozilla.org › en-US › docs › Web › JavaScript › Reference › Global_Objects › Set
Set - JavaScript | MDN
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.
🌐
W3Schools
w3schools.com › js › js_set_methods.asp
JavaScript Set Methods
If an attempt is made to add an element that already exists in the set, the add() method will have no effect, and the set will remain unchanged.
🌐
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
You can now use the JavaScript Set methods to perform set operations like intersection, union and more.
🌐
DEV Community
dev.to › zacharylee › 7-new-javascript-set-methods-4737
7 New JavaScript Set Methods - DEV Community
July 13, 2024 - The union() method of Set instances takes a set and returns a new set containing elements which are in either or both of this set and the given set.
🌐
Telerik
telerik.com › blogs › understanding-utilizing-javascript-set-object
Understanding and Utilizing the JavaScript Set Object
February 2, 2024 - By leveraging the Set's built-in methods for adding, checking and removing values, developers can simplify their code and reduce the complexity of handling distinct values. Moreover, the Set object ensures uniqueness, maintains insertion order and provides efficient value existence checks, which makes it a powerful tool in specific use cases. A Map object in JavaScript ...
🌐
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.
🌐
W3Schools
w3schools.com › js › js_sets.asp
JavaScript Sets
JavaScript Set Methods · JavaScript Set Logic · JavaScript Weak Sets · JavaScript Set Reference · JavaScript Maps · Set is an ES6 feature. ES6 is fully supported in all modern browsers since June 2017: ❮ Previous Next ❯ · ★ +1 · Sign in to track progress ·
Find elsewhere
🌐
YouTube
youtube.com › watch
Sets in Javascript (Set Object) - YouTube
Similar to Arrays, a Set can be used to store a sequence of values in Javascript. However, a Set can only store unique values, meaning we cannot store duplic...
Published: December 24, 2017
🌐
Reddit
reddit.com › r/javascript › new javascript set methods
r/javascript on Reddit: New JavaScript Set methods
July 10, 2024 - 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 ...
🌐
MDN Web Docs
developer.mozilla.org › en-US › docs › Web › JavaScript › Reference › Global_Objects › Set › has
Set.prototype.has() - JavaScript | MDN
const mySet = new Set(); mySet.add("foo"); console.log(mySet.has("foo")); // true console.log(mySet.has("bar")); // false const set = new Set(); const obj = { key1: 1 }; set.add(obj); console.log(set.has(obj)); // true console.log(set.has({ key1: 1 })); // false, because they are different object references console.log(set.add({ key1: 1 })); // now set contains 2 entries
🌐
DEV Community
dev.to › keevcodes › the-javascript-set-object-2f75
The JavaScript Set Object - DEV Community
June 27, 2019 - Set is an object that can store any type of JavaScript primitive (think booleans, strings, numbers here), but it will only store unique primitives. Wait... what??? That's awesome! Yeah, my fellow developer, yeah. Instead of using the filter method, all we have to do is pass our postTypes array into the Set object and wrap it into an array.
🌐
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 - JavaScript Set Methods A set in JavaScript is a collection of unique values. It means that no value can appear more than once within a set. Sets are often used when you need to store a collection of …
🌐
Medium
medium.com › @asierr › javascripts-set-methods-finally-native-set-operations-20fbca65ef65
JavaScript’s Set Methods: Finally, Native Set Operations! | by asierr.dev | Medium
March 6, 2025 - JavaScript developers have been hacking together workarounds for common Set operations like union, intersection, and difference for years. But that’s about to change! With ECMAScript 2024, JavaScript finally introduces native Set methods, making operations on unique value collections faster and easier than ever before.
🌐
i2tutorials
i2tutorials.com › home › javascript – tutorial › javascript-set
Javascript-Set | i2tutorials
January 8, 2021 - <!DOCTYPE html> <script> "use strict";globalThis.__codeBoxId = "p8hj2rbs3i"; let set = new Set(); let john = { name: "John" }; let pete = { name: "Pete" }; let mary = { name: "Mary" }; // visits, some users come multiple times set.add(john); set.add(pete); set.add(mary); set.add(john); set.add(mary); // set keeps only unique values alert( set.size ); // 3 for (let user of set) { alert(user.name); // John (then Pete and Mary) } </script>
🌐
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 - */ const mapaches1 = new Set(["Luna", "Apollo", "Orion", Apollo]) /** * Another Set of mapaches' names; the duplicate "Nova" will be removed… ... AI-Native Senior Full-Stack SWE · UI/UX Engineer · TypeScript specialist · 20+ years of SWE · BS & MS age 19 · Doctor of Physical Therapy · DoctorDerek.com ... Pro tutorials about just JavaScript: “vanilla JS” without frameworks, frontend JS, backend JS / Node.js, and the npm package ecosystem.
🌐
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
🌐
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:
🌐
GeeksforGeeks
geeksforgeeks.org › javascript › javascript-set-reference
JavaScript Set Reference - GeeksforGeeks
July 23, 2025 - A JavaScript property is a member of an object that associates a key with a value. An instance property is a property that has a new copy for every new instance of the class. Methods are actions that can be performed on objects.