What should max be initialised to?
NUMBER_OF_INPUTS = 5;
var i;
var max;
var userInput; // Input from user
max = ???? ;
for(i=0; i<NUMBER_OF_INPUTS; i++)
{ userInput = parseInt(prompt('Enter input: '));
if (userInput > max)
max = userInput;
}
alert('Max: ' + max);
max, anyway? Please clarify. – codesparkle♦ Aug 14 '12 at 4:38