As shown below:
Usage of arguments
< ;
var sum = 0;
for (var i = 0; i < arguments.length; i ) {
sum = arguments[i];
}
return sum;
}
sum = display(1000, 2000, 3000, 4000, 5000);
document.writeln('sum1:' sum '
');
sum = display(100, 200, 300);
document.writeln('sum2:' sum);