Skip to content

Commit f842ef9

Browse files
committed
feat: Added Standard Deviation algorithm to Math
1 parent f5dbdce commit f842ef9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: Maths/StandardDeviation.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ function standardDeviation(nums) {
1414

1515
let sum = 0
1616
for (let i = 0; i < nums.length; i++) {
17-
if (isNaN(nums[i]) || Array.isArray(nums[i])) {
17+
if (typeof (nums[i]) != 'number') {
1818
throw new TypeError('Number type required in array input!')
1919
}
2020
sum += nums[i]

0 commit comments

Comments
 (0)