Hey there skptricks!
I stumbled upon this while writing my own and wanted to point out something.
You cannot rely on isNaN() for checking if something is a number. You can use it to check if the input provided to isNaN() will cause further NaN values. If that makes sense.
Using it the way you have, true and false will result in true is a number.
true is a number.
Here's a function I wrote to check if something is a number: codepen.io/grok/pen/LvOQbW?editors...
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.