adding numbers in an array in js code example Example: adding numbers in an array javascript console.log( [].reduce((a, b) => a + b) )