var func = function () {
var maxNumber = arguments[0];
for(var i = 0;i<arguments.length;i++)
{
if (maxNumber < arguments[i])
{
maxNumber = arguments[i];
}
}
return maxNumber;
}
console.log(func(1, 2, 3, 45, 5, 6, 7, 8, 30, 21));
网友评论