fixed spacing in loops (#21571)

pull/21817/head^2
Chyanne Haugen 2018-11-04 23:07:10 -08:00 committed by Manish Giri
parent 8e4b2795ab
commit 01a3532484
1 changed files with 2 additions and 2 deletions

View File

@ -14,7 +14,7 @@ The 'break' control statement breaks out of the loop when the condition is met.
For example, in the loop below if i reaches 5, the loop breaks, so it does not continue on.
```java
for(int i=0;i<10;i++){
for(int i=0; i < 10; i++){
if(i == 5){ //if i is 5, break out of the loop.
break;
@ -33,7 +33,7 @@ Output:
The 'continue' control statement is the less intense version of 'break'. It only breaks out of the current instance of the loop and continues on. In the loop below, if i is 5, the loop continues, so it will skip over the print statement below and move on until i reaches 10 and the loop stops.
```java
for(int i=0;i<10;i++){
for(int i=0; i < 10; i++){
if(i == 5){ //if i is 5, break out of the current instance loop.
continue;