Does anyone else find the name `flatMap` confusing in JavaScript/EcmaScript?
The first time I saw the Array method flatMap
, I naturally thought it first flats, then maps. But turned out its the other way around. If I had this function in my codebase I’d name it mapAndFlat
.