Iterate Through an Array with a For Loop - Free Code Camp

preview_player
Показать описание
Рекомендации по теме
Комментарии
Автор

Really thank you, this was a hard one to understand to me, the console log help me to get it

ruth
Автор

Thanks. Even though your explanation was good, I haven't fully understood the lesson yet. I need to look at it again. I guess that not knowing the real life applications for this kind of functions makes it even harder to understand it

KidSpiegel
Автор

do you think that the free code camp js section does a good job of laying the foundations for js programming?

conorfarrell
Автор

Interesting, I wonder why if I use the const and let instead of var which is the older version, it wouldn't
work. For example like this:

const myArr = [2, 3, 4, 5, 6];
const total = 0;
for (let i = 0; i < myArr.length; i++) {
total += myArr[i]
}
console.log(total)

AmandaChoi
Автор

Why does i equal the different elements in the array?

jessicasullivan
Автор

5:08, it was apparent you were about to shit your pants for getting a wrong answer in 😂😂😂😂😂😂😂😂

skhumbuzocele