asked on September 21, 2015
I have a Forms process that has the following code in it that I received from somewhere on Answers as an answer to another question:
function parseNumber(n) {
var f = parseFloat(n); //Convert to float number.
return isNaN(f) ? 0 : f; //treat invalid input as 0;
}
If I want to treat invalid input as nothing, what would I change this to?
1
0