@Matthias Gaudin First, thanks for the correcting me on the typo concerning the NaN output. I just fixed it in the article and code.

As for the discussion around this , given the fluidity of JavaScript, it makes sense that trying to type this in a general context is problematic.

Broad infrastructure, development, and soft-skill background

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store