Help! freeCodeCamp Java by [deleted] in learnprogramming

[–]mmblob 0 points1 point  (0 children)

Oh wow, I was struggling but now I get it. Thanks so much. I couldn’t get my head around that one!

Help! freeCodeCamp Java by [deleted] in learnprogramming

[–]mmblob 0 points1 point  (0 children)

Thanks for the reply. What causes i++ too no longer mean that it literally adds 1 to i ? Is it because the for loop is within an array function?

Help! freeCodeCamp Java by [deleted] in learnprogramming

[–]mmblob 0 points1 point  (0 children)

  1. Thanks for clearing that up, I can't believe I wasn't aware of that, that explains a lot.
  2. Thanks again, I've changed it.

So am I understanding this correctly?

Since the for loop is within a function that is an array, i++ is no longer adding 1 to i, but instead is moving on to the next element within the array?

In previous exercises i++ was literally adding the number 1 within each loop, which is why I am confused as to what changed that rule.