Javascript - Loops (For, While, Do...while)
Greetings Forum. I master the subject of the three loops mentioned. First of all, I want to say that I know how to apply the three loops aforementioned. However, I have another question. //This is the for loop for (i=0; i<=100; i++) { } document.write(i + "<br/>"); I know that <<document.write(i +"<br/>") is outside of the loop therefore the result would be different than if it was inside, but I want to know the logic that gets me "101" as an answer. When <<document.write(i + "<br/>")>> is inside the loop, I understand the logic that gives me that list of numbers from 0 to 100. But can someone explain the logic when <<document.write(i + "<br/>")>> is not inside the loop? PS: By inside the loop (resp. outside of the loop), I mean inside the curly brackets (resp. outside of the curly brackets). Thank you in advance.