Setting and deleting entries from Map

The rest of this chapter will focus on new data structures added in ECMAScript. To some extent, they can be simulated in ES5. However, native support and explicit naming make code that utilizes these features more efficient and clearer.

In this recipe, we'll take a look at the basics of adding and removing entries from a Map using the set and delete methods.

Get ECMAScript Cookbook 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.