<html>
<body>
<h2>JavaScript Arrays</h2>
<p>Subtract the numbers in the array, starting from the left:</p>
<p id="demo"></p>
<script>
const numbers = [175, 50, 25];
document.getElementById("demo").innerHTML = numbers.reduce(myFunc);
function myFunc(total, num) {
return total - num;
}
</script>
</body>
</html>