update snippets 0-All

This commit is contained in:
Stefan Feješ
2017-12-25 14:49:52 +01:00
committed by Agamemnon Zorbas
parent 6bedb8fba4
commit 0c129cdd02
33 changed files with 166 additions and 74 deletions

View File

@ -14,6 +14,9 @@ const standardDeviation = (arr, usePopulation = false) => {
.reduce((acc, val) => acc + val, 0) / (arr.length - (usePopulation ? 0 : 1))
);
};
// standardDeviation([10,2,38,23,38,23,21]) -> 13.284434142114991 (sample)
// standardDeviation([10,2,38,23,38,23,21], true) -> 12.29899614287479 (population)
```
```js
standardDeviation([10,2,38,23,38,23,21]) -> 13.284434142114991 (sample)
standardDeviation([10,2,38,23,38,23,21], true) -> 12.29899614287479 (population)
```