You are viewing a single comment's thread. Return to all comments →
Javascript
function stdDev(arr) { const sum = arr.reduce((acc, cur) => acc + cur, 0); const mean = sum / arr.length; console.log(Math.sqrt([...arr].reduce((acc, curr) => acc + Math.pow(curr - mean, 2), 0) / arr.length).toFixed(1)) }
Seems like cookies are disabled on this browser, please enable them to open this website
Day 1: Standard Deviation
You are viewing a single comment's thread. Return to all comments →