Skip to content

Instantly share code, notes, and snippets.

@joelmm1
joelmm1 / stdev.js
Created Aug 13, 2017 — forked from hanksudo/stdev.js
Standard deviation(STDEV) with JavaScript
View stdev.js
var stdev = function(arr) {
var n = arr.length;
var sum = 0;
arr.map(function(data) {
sum+=data;
});
var mean = sum / n;