I actually passed the lesson but I would like to know what makes the solution 20? I am trying to really understand what I typed. I’ve been printing to console to see if I got the correct solution prior to submitting my code.
var ourArr = [ 9, 10, 11, 12];
var ourTotal = 0;
for (var i = 0; i < ourArr.length; i++) {
ourTotal += ourArr[i];
}
// Setup
var myArr = [ 2, 3, 4, 5, 6];
// Only change code below this line
var myTotal = 0;
for (var i = 0; i < myArr.length; i++) {
myTotal += myArr[i];
}
console.log(myTotal)```