Fix: remove quote from challenge where not needed [english] (#35493)

This commit is contained in:
NITIN BISHT
2019-03-19 15:04:03 +05:30
committed by The Coding Aviator
parent 4d1d89b1c7
commit 228d873dd3
14 changed files with 35 additions and 35 deletions

View File

@@ -7,7 +7,7 @@ videoUrl: 'https://scrimba.com/c/cDqWGcp'
## Description
<section id='description'>
The next type of loop you will learn is called a "<code>do...while</code>" loop. It is called a <code>do...while</code> loop because it will first "<code>do</code>" one pass of the code inside the loop no matter what, and then continue to run the loop "<code>while</code>" the specified condition evaluates to <code>true</code>.
The next type of loop you will learn is called a <code>do...while</code> loop. It is called a <code>do...while</code> loop because it will first <code>do</code> one pass of the code inside the loop no matter what, and then continue to run the loop <code>while</code> the specified condition evaluates to <code>true</code>.
<blockquote>var ourArray = [];<br>var i = 0;<br>do {<br>&nbsp;&nbsp;ourArray.push(i);<br>&nbsp;&nbsp;i++;<br>} while (i < 5);</blockquote>
The example above behaves similar to other types of loops, and the resulting array will look like <code>[0, 1, 2, 3, 4]</code>. However, what makes the <code>do...while</code> different from other loops is how it behaves when the condition fails on the first check. Let's see this in action:
Here is a regular <code>while</code> loop that will run the code in the loop as long as <code>i < 5</code>:

View File

@@ -8,7 +8,7 @@ videoUrl: 'https://scrimba.com/c/c9yNVCe'
## Description
<section id='description'>
You can run the same code multiple times by using a loop.
The most common type of JavaScript loop is called a "<code>for loop</code>" because it runs "for" a specific number of times.
The most common type of JavaScript loop is called a <code>for loop</code> because it runs "for" a specific number of times.
For loops are declared with three optional expressions separated by semicolons:
<code>for ([initialization]; [condition]; [final-expression])</code>
The <code>initialization</code> statement is executed one time only before the loop starts. It is typically used to define and setup your loop variable.

View File

@@ -8,7 +8,7 @@ videoUrl: 'https://scrimba.com/c/c8QbnCM'
## Description
<section id='description'>
You can run the same code multiple times by using a loop.
The first type of loop we will learn is called a "<code>while</code>" loop because it runs "while" a specified condition is true and stops once that condition is no longer true.
The first type of loop we will learn is called a <code>while</code> loop because it runs "while" a specified condition is true and stops once that condition is no longer true.
<blockquote>var ourArray = [];<br>var i = 0;<br>while(i &#60; 5) {<br>&nbsp;&nbsp;ourArray.push(i);<br>&nbsp;&nbsp;i++;<br>}</blockquote>
Let's try getting a while loop to work by pushing values to an array.
</section>