Last practice for loops syntax


#1


https://www.codecademy.com/en/courses/javascript-beginner-en-NhsaT/1/3?curriculum_id=506324b3a7dffd00020bf661


Apparently there is some kind of syntax error in my code.
"SyntaxError: Unexpected token >"
I don't understand how thats a syntax error because I looked in all the other for loop exercises, and they all use inequality symbols in the same way I did here.

for (var v = 100, v > 0 , v-=5) {
    console.log(v);
}


#2

the items in the for loop are separated by semi-colons, not comma's:

for (initialize; condition; decrement)

see? :, not ,)


#3

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.