Open MarcoL10 opened 2 years ago
i have the same problem, what does it mean?
I can’t do it, how do I do it?
same problem
Hello people, if you have the correct result, your codes are something like this:
let total = 0
let limit = 10
for(let i = 0; i < limit; i++){
total = total + i
}
console.log(total)
for each repetition, the previous value of the variable i
is added
for i
between 0 and 10 the result is:
0+1+2+3+4+5+6+7+8+9 = 45
have no clue
I have a problem with the exercise for-loop with JavaScripting. I mean I got the right result but just I don't understand why the result is 45. Can someone gently explain it to me ? How total become 45 ? Thanks in advance