VS Code error with 'for' loop

Hi, I am beginner in JS and currently learning ‘for’ loops. I get an error for this code in Visual Studio code:

for (let i = 0, i < 10, i++){

Error message: ‘cannot redeclare block-scoped variable ‘i’.’

I have never declared this variable anywhere in the file. This is the only piece of code I have in this JS file. This is my beginner’s step in ‘for’ loops. Is this some VS code error?

try to use semicolon instead of colon in the loop

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