Loading topic
Set is a built-in collection that stores unique values. Each value appears in it at most once. You can add values, check whether a value is present, remove values, and read how many values it holds. A Set has no keys and no indexes. The value is the only thing it stores.5 min readMap and a Set and call set, get, add, and has on them. It also assumes you understand the difference between primitive values and object references. The chapter covers one question: when you call map.get(x) or set.has(x), how does4 min readfor...of loops, array destructuring, the spread operator, and the basic Map methods set, get, has, and delete from the Map fundamentals chapter. It explains how Maps hand you their contents, what order the entries come in, and what happens when the Map changes4 min readadd, has, and delete, and that you know Sets compare values with SameValueZero. It also relies on for...of, the spread operator, and the array methods filter and map. The focus here is how a Set gives its values back to yo5 min readset, get, has, delete, size), how Maps iterate in insertion order, and how SameValueZero compares keys. It also assumes you are comfortable with object property access, Object.keys, and the difference between primitives and5 min readSet, add and check values with add and has, and iterate a Set in insertion order. It also assumes you know SameValueZero equality from earlier chapters, because every method here uses it to decide whether two values match.3 min readmap and filter, APIs that take plain objects, and JSON payloads sent over a network or saved to disk. This chapter covers the conversions between these forms and the infor5 min readreduce or a loop. Map.groupBy now does it in one call and returns4 min readset, get, has, delete). It also assumes you have read the earlier chapters on reachability and on the rules for weak keys. Here you will learn the WeakMap API itself: how its entries behave over their lifetime, and how it differs from a Map 5 min readset, get, has, delete), that WeakMap keys must be objects (or non-registered symbols), and that a WeakMap does not keep its keys alive. It covers the two patterns WeakMap was built for: caching computed results per object, and storing pr5 min readSet API, understand reachability and garbage collection, and know which values weak collections accept. It also assumes you know the difference between primitive values and object references. The focus here is the WeakSet API and the main thing it is use5 min read?.), and setTimeout.5 min readMap, Set, SameValueZero, iteration, conversion, and the weak collections. It also assumes you are comfortable with the difference between primitive values and object references. The goal here is to pull that material together i4 min read