Skip to content

Commit

Permalink
fixed solution use for of
Browse files Browse the repository at this point in the history
  • Loading branch information
UmiKami committed Jun 15, 2023
1 parent b51ba17 commit bda99ed
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions exercises/17-The-for-loop/solution.hide.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
let myArray = [2323, 4344, 2325, 324413, 21234, 24531, 2123, 42234, 544, 456, 345, 42, 5445, 23, 5656, 423];

let avg = 0;
for (let i in myArray) {
avg += myArray[i]
for (let i of myArray) {
avg += i
}
let avgTest = avg / myArray.length

Expand Down

0 comments on commit bda99ed

Please sign in to comment.