Slide 15
Slide 15 text
Collections
All collections support sub-linear lookup times
Sets can remove duplicates in linear time
Maps and Sets enumerate entries in insertion order
WeakMaps and WeakSets use weak
references to allow for garbage collection
var unique = [...new Set([1, 2, O, 2, 3, 'A', 'B', O, 'C', 'C', 'D'])];
// => [1, 2, O, 3, 'A', 'B', 'C', 'D']