var arr = []; 
arr.push(1); 
arr.push(5); 
arr.push(2); 
 
alert(Math.max.apply(null, arr)); //

Назад