81
rated 0 times
[
83]
[
2]
/ answers: 1 / hits: 21775
/ 12 Years ago, thu, october 18, 2012, 12:00:00
When passing values to the Math.max
or Math.min
function in JavaScript, they return the highest and lowest values from the input respectively.
However, if a piece of data that is undefined is entered, e.g.
Math.max(5,10,undefined);
The result returned is NaN
. Is there a simply way to fix this using JS/jQuery?
More From » jquery