A very nice clear explanation. I mean, if you’ve done functional programming in Javascript, you’ve made this sort of error a few times — several times if you’re me — but it’s good to have it written out for the next guy.
However, as always, the object model of Javascript makes me a little sad.
That, as in your example, numStr => parseInt(numStr)
is not the same as just parseInt
is something I know through bitter experience and yet it’s never become intuitive to me — I always have to remind myself.