Skip to content

Commit

Permalink
Fix Typo (freeCodeCamp#37557)
Browse files Browse the repository at this point in the history
  • Loading branch information
od-c0d3r authored and Manish-Giri committed Oct 26, 2019
1 parent c0d75ed commit b59f729
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ while (i < 5) {
}
```

In this example, we initialize the value of <code>myArray</code> to an empty array and the value of <code>i</code> to 5. When we execute the <code>while</code> loop, the condition evaluates to <code>false</code> because <code>i</code> is not less than 5, so we do not execute the code inside the loop. The result is that <code>ourArray</code> will end up with no values added to it, and it will still look like <code>[]</code> when all of the code in the example above has completed running.
In this example, we initialize the value of <code>ourArray</code> to an empty array and the value of <code>i</code> to 5. When we execute the <code>while</code> loop, the condition evaluates to <code>false</code> because <code>i</code> is not less than 5, so we do not execute the code inside the loop. The result is that <code>ourArray</code> will end up with no values added to it, and it will still look like <code>[]</code> when all of the code in the example above has completed running.
Now, take a look at a <code>do...while</code> loop:

```js
Expand Down

0 comments on commit b59f729

Please sign in to comment.