I am passing in a parameter called value. I\'d like to know if value is a float. So far, I have the following:
if (!isNaN(value)) { alert(\'this is a num
If you need to check if value is int or float:
function isFloatOrInt(n) { return !isNaN(n) && n.toString().match(/^-?\d*(\.\d+)?$/); }