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