<html>
<body>
<h2>JavaScript apply()</h2>
<p>This example returns the highest number in an array of numbers:</p>
<p id="demo"></p>
<script>
document.getElementById("demo").innerHTML = Math.max.apply(0, [1,2,3]);
</script>
</body>
</html>