JavaScript: Maps and Sets

JavaScript: Maps and Sets

English | MP4 | AVC 1280×720 | AAC 44KHz 2ch | 1h 41m | 297 MB

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.

Table of Contents

1 Get to know JavaScript maps and sets
2 What you should know

1. Maps
3 Challenge Maps
4 Solution Maps
5 The Map object defined
6 Build your Map object with the set method
7 Access a value with get
8 Does the map have your key
9 Determine map size
10 Remove key-value pairs with clear and delete
11 Map Keys and values methods
12 Map contents with the entries method
13 Loop over a map with forEach

2. WeakMaps
14 What is the WeakMap object
15 Same methods, different map
16 Challenge WeakMaps
17 Solution WeakMaps

3. Sets
18 Solution Sets
19 The Set object defined
20 Add values to your set
21 Does Set have your value
22 Get your set size
23 Delete and clear values in your set
24 Iterate over values in a set
25 Iterate over a set with entries
26 Iterate over your set with forEach
27 Challenge Sets

4. WeakSets
28 What is the WeakSet object
29 Same methods, different set
30 Challenge WeakSets
31 Solution WeakSets

32 Next steps