I\'m doing some trouble-shooting and want to add a check that a parameter to a function is a number. How do I do this?
Something like this...
function fn
Check if the type is number, and whether it is an int using parseInt:
parseInt
if (typeof id == "number" && id == parseInt(id))