r/JavaScriptTips • • Mar 14 '23

What am I doing wrong?

Post image
6 Upvotes

7 comments sorted by

View all comments

2

u/Ironclad_57 Mar 14 '23

Don’t include the declaration keyword (var let) when you change a variable only on first declaration. So Var i = 0; i = 1;

Not Var i = 0; Var i = 1;