JavaScript: Maps and Sets
1h 10mBeginner2025-03-07
Authors

Jamie Pittman
Full-Stack Software Developer
Course details
Programming languages are always evolving and changing, and JavaScript is no exception. Over time, JavaScript has grown, and many new aspects have been added, including maps and sets. JavaScript maps and sets may sound simple, but they aren't quite the same as their counterparts in other programming languages. In this course, software engineer Jamie Pittman covers the ins and outs of JavaScript maps and sets, their syntax, how they work, and how to integrate them into your daily coding practice. Topics covered include a general overview of these features, when and where to use them, their WeakMap and WeakSet versions, and the various methods and properties associated with them.
Skills covered
JavaScriptOracleProgramming LanguagesSoftware DevelopmentDeep Dive (X:Y)
Concepts
0. Introduction
- 01 - Get to know JavaScript maps and sets
- 02 - What you should know
1. Maps
- 03 - The Map object defined
- 04 - Build your Map object with the set method
- 05 - Access a value with get
- 06 - Does the map have your key
- 07 - Determine map size
- 08 - Remove key-value pairs with clear and delete
- 09 - Map - Keys and values methods
- 10 - Map contents with the entries method
- 11 - Loop over a map with forEach
- 12 - Group entries with groupBy
- 13 - Solution - Maps 1
- 14 - Solution - Maps 2
2. WeakMaps
- 15 - What is the WeakMap object
- 16 - Same methods, different map
3. Sets
- 17 - The Set object defined
- 18 - Add values to your set
- 19 - Does Set have your value
- 20 - Get your set size
- 21 - Delete and clear values in your set
- 22 - Iterate over values in a set
- 23 - Iterate over a set with entries
- 24 - Iterate over your set with forEach
- 25 - Solution - Sets 1
- 26 - Solution - Sets 2
4. WeakSets
- 27 - What is the WeakSet object
- 28 - Same methods, different set
Conclusion
- 29 - Next steps
Related courses
- JavaScript for Web Designers
- Vanilla JavaScript: Building on the Document Object Model (DOM)
- HTML5: Geolocation
- R: Interactive Visualizations with htmlwidgets
- Build a Google Maps App with JavaScript
- DC.js for Data Science Essential Training
- Learning ECMAScript 6+ (ES6+)
- D3.js Essential Training for Data Scientists
Related learn paths
- Improve Your JavaScript Language Skills
- Become a Data Visualization Specialist: Tools
- Improve Your Web Design Coding Skills
- Advance Your Skills as an R Expert
- Explore Web Development with Vanilla JavaScript
- Master Dashboards and Data Viz in Power BI
- Build Your WordPress Ecommerce Skills
- Become a JavaScript Developer