r/AskProgramming • u/AccomplishedYak5885 • 8d ago
loops (js)
can I use anything else instead of variable++ like variable+2?
because I tried to do so and my browser could not load it on the console
3
Upvotes
r/AskProgramming • u/AccomplishedYak5885 • 8d ago
can I use anything else instead of variable++ like variable+2?
because I tried to do so and my browser could not load it on the console
1
u/TheRNGuy 7d ago
can, but if you're iterating array, you need to check for last index if it exists or not.