Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 4ac601c

Browse files
committed
Added test array to make sure function works
1 parent 0030d0e commit 4ac601c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

‎JSAlgorithms/findAverage.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,7 @@ function findAverage(array) {
44
runningTotal += array[i];
55
}
66
return runningTotal / array.length;
7-
}
7+
}
8+
9+
let test = [3, -1, 0, 9];
10+
console.log(findAverage(test));

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /