how to find max number js code example
Example 1: js maximum number value
Number.MAX_VALUE;
Example 2: javascript max number
MAX_SAFE_INTEGER = 9007199254740991
Example 3: find max value in javascript
x = findMax(1, 123, 500, 115, 44, 88);
function findMax() {
var i;
var max = -Infinity;
for (i = 0; i < arguments.length; i++) {
if (arguments[i] > max) {
max = arguments[i];
}
}
return max;
}