Home & blog

Tag: maps

JavaScript maps and sets part 2: Weak maps

1 Jan 2021 maps

In part two of this in-depth guide to JavaScript maps and sets we'll be looking at the weird, exotic world of weak maps. These are like maps, except the keys are always objects and the entries are "weakly held". We'll explore just what this means.

JavaScript maps and sets part 1: Maps

15 Dec 2020 maps

In this guide we'll be looking at JavaScript maps and sets. First up, maps, which are a sort of super object. They work like objects, but with some key differences and improvements - most notably, they have a reliable order and can accesspt any data type as keys!