how can you find the min or max number in a function like this {"a",5,"h",7,true,6,"h",7}. The solution must be applicable to other kinds of functions with the same characteristic. I set min = arguments[0] but what if it's not a number? you know i was reading about functions and I read about arguments objects,which contains an array of arguments.i tried this:
function argsMin() {
var i = 0;
var min=arguments[0];
for(i=0;i<arguments.length;i++) {
if(min>arguments[i]){
min=arguments[i];
}
}
return min;
}
document.write(argsMin(1124,562,-973,955));
now what if the first index is not a number.