JSFiddle - React, Tailwind, and code Playground
JavaScript
var max = function(){
var p = [];
for(var i = 0; i < arguments.length; i++){
p.push(parseInt(arguments[i]) || null);
}
return Math.max.apply(Math.max, p);
}
console.log(max(1, 2, "123" ,"4", "null", "123123123"))