This site is mobile accessible. Press the "Tap Here" button to use a smaller font-size.
Smartphone icons created by Freepik - Flaticon
Find the sum of all numbers in an array:
const numbers = [45, 4, 9, 16, 25]; let sum = numbers.reduce(myFunction); document.getElementById("demo").innerHTML = "The sum is " + sum; function myFunction(total, value) { return total + value; }