Skip to content

Commit

Permalink
fix: fix absolute deviation computation
Browse files Browse the repository at this point in the history
Signed-off-by: Jérôme Benoit <[email protected]>
  • Loading branch information
jerome-benoit committed Sep 29, 2024
1 parent 81749fb commit c2ad613
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib.js
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ const absoluteDeviation = (arr, aggFn) => {
const value = aggFn(arr)
const absoluteDeviations = []

for (const elt in arr) {
for (const elt of arr) {
absoluteDeviations.push(Math.abs(elt - value))
}

Expand Down

0 comments on commit c2ad613

Please sign in to comment.