1 line of code: How to get the sum of an array of numbers
const sum = arr =&gt; arr.reduce((a, b) =&gt; a + b, 0);        Enter fullscreen mode           ...
Tags: javascript, webdev, performance, codequality