TIL: A Basic Thing about map()
So many times I learn or correct my knowledge of things when I’m doing code reviews. TIL that I was under the incorrect assumption that map() would skip over null or undefined array entries. I was wrong. It makes sense in hindsight. Especially since it's in the first line of the documentation. 🤦♀️ MDN Docs The map() method creates a new array populated with the results of calling a provided function on every element in the calling array.