Skip to content

Commit

Permalink
Merge pull request #129 from UmiKami/17-The-for-loop
Browse files Browse the repository at this point in the history
fixed solution use for of
  • Loading branch information
tommygonzaleza authored Jun 15, 2023
2 parents b51ba17 + bda99ed commit 0159cbe
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 0159cbe

Please sign in to comment.