© Raju Gandhi 2019
R. GandhiJavaScript Nexthttps://doi.org/10.1007/978-1-4842-5394-6_6

6. Maps and Sets—The New Data-structures on the Block

Raju Gandhi1 
(1)
Columbus, OH, USA
 

A programming language must provide us with all of the necessary constructs that empower developers to model their domain and problem space clearly and efficiently. Till date, JavaScript lacked support for two fundamental types that most other languages offer, namely maps and sets. This changes in ES6.

In this chapter we will explore the use-cases for two new data-structures introduced in ES6, namely Maps and Sets. We will start with their construction and understand their API, and even take a look under the hood to see how they are implemented. By the end of this chapter, we ...

Get JavaScript Next: Your Complete Guide to the New Features Introduced in JavaScript, Starting from ES6 to ES9 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.