If ++ as in num++ added a number how do you add 2,3,4 etc numbers ?
This is a good example of why ++ should not be used, and that += should be used instead.
For example:
var i;
for (i = 0; i < 10; i += 1) {
...
}
If you want to add 3 instead, you can then change the += 1 to instead be += 3
var i;
for (i = 0; i < 10; i += 3) {
...
}
I see thanx. I’m still grasping the concept of using a variable i.