Introduction

We saw how to use ECMAScript classical semantics to concisely express more sophisticated relationships between data and operations. We also saw how to take advantage of expanded APIs for existing types (object and array). However, ECMAScript has more to offer. Among the new types are Symbol, Map, and cousin of Map, that is, WeakMap. These types, to some extent, could be simulated in earlier versions of JavaScript, but now are readily available and have native support.

The recipes in this chapter will illustrate some uses of these types, both together and in isolation.

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.