#for loops
25 messages · Page 1 of 1 (latest)
Hey, @sweet forge!
Please remember to /close this post once your question has been answered!
and also whats the difference between print out ln and without ln
Why do you think it should start at 6?
bc it adds 1 with the i++ doesnt it
println prints a newline character after your string. Print doesn't
i++ is done after the first iteration
?
i is incremented after the first run of the loop, not before
So the initial value of i is 5
Since that's what you set it to be
ah so it only adds after one run
can you explain that again in normie language
whats a newline character?
Yes. The official word for a "run" is an iteration
A line break, equivalent of pushing the enter button
i++ starts after the iteration is finished with i = 5, no?
Oh you said before me 😄
It shouldn't
print will print "5678910", println should print:
5
6
7
8
9
10
that makes sense
Before your post will be closed, would you like to express your gratitude to any of the people who helped you? When you're done, click I'm done here. Close this post!.