From 1c9dd4dba27faccace08daaf56e9e7a2d2279a79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Iv=C3=A1n=20Mungu=C3=ADa?= Date: Sun, 7 Jan 2018 23:23:55 -0600 Subject: [PATCH] fix(seed/challenges): Correct typo in a JavaScript challenge (#16441) --- .../basic-javascript.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/challenges/02-javascript-algorithms-and-data-structures/basic-javascript.json b/challenges/02-javascript-algorithms-and-data-structures/basic-javascript.json index 69fb1fedd0..f00b8b370f 100644 --- a/challenges/02-javascript-algorithms-and-data-structures/basic-javascript.json +++ b/challenges/02-javascript-algorithms-and-data-structures/basic-javascript.json @@ -5411,7 +5411,7 @@ "Now, take a look at a do...while loop.", "
var ourArray = [];
var i = 5;
do {
ourArray.push(i);
i++;
} while (i < 5);
", "In this case, we initialize the value of i as 5, just like we did with the while loop. When we get to the next line, there is no check for the value of i, so we go to the code inside the curly braces and execute it. We will add one element to the array and increment i before we get to the condition check. Then, when we get to checking if i < 5 see that i is now 6, which fails the conditional check. So we exit the loop and are done. At the end of the above example, the value of ourArray is [5].", - "Essenially, a do...while loop ensures that the code inside the loop will run at least once.", + "Essentially, a do...while loop ensures that the code inside the loop will run at least once.", "Let's try getting a do...while loop to work by pushing values to an array.", "
", "Change the while loop in the code to a do...while loop so that the loop will push the number 10 to myArray, and i will be equal to 11 when your code finishes running."