01 / 06
Objects are hard to count
You already know one other container that holds key and value pairs: the object.
But objects have something they are bad at. How many entries are in there right now does not come out plainly. .length belongs to arrays, so it does not work, and with data whose keys come and go, this quietly becomes a nuisance.