diff --git a/seed/challenges/01-front-end-development-certification/basic-javascript.json b/seed/challenges/01-front-end-development-certification/basic-javascript.json
index d0fdc89561..663456310a 100644
--- a/seed/challenges/01-front-end-development-certification/basic-javascript.json
+++ b/seed/challenges/01-front-end-development-certification/basic-javascript.json
@@ -4990,6 +4990,57 @@
}
}
},
+ {
+ "id": "cf1111c1c11feddfaeb1bdef",
+ "title": "Iterate with JavaScript While Loops",
+ "description": [
+ "You can run the same code multiple times by using a loop.",
+ "Another type of JavaScript loop is called a \"while loop
\", because it runs \"while\" a specified condition is true and stops once that condition is no longer true.",
+ "
var ourArray = [];", + "Let's try getting a while loop to work by pushing values to an array.", + "
var i = 0;
while(i < 5) {
ourArray.push(i);
i++;
}
myArray
using a while
loop."
+ ],
+ "challengeSeed": [
+ "// Setup",
+ "var myArray = [];",
+ "",
+ "// Only change code below this line.",
+ "",
+ ""
+ ],
+ "tail": [
+ "if(typeof myArray !== \"undefined\"){(function(){return myArray;})();}"
+ ],
+ "solutions": [
+ "var myArray = [];\nvar i = 0;\nwhile(i < 5) {\n myArray.push(i);\n i++;\n}"
+ ],
+ "tests": [
+ "assert(code.match(/while/g), 'message: You should be using a while
loop for this.');",
+ "assert.deepEqual(myArray, [0,1,2,3,4], 'message: myArray
should equal [0,1,2,3,4]
.');"
+ ],
+ "type": "waypoint",
+ "challengeType": 1,
+ "translations": {
+ "es": {
+ "title": "Iterar con JavaScript con ciclos while",
+ "description": [
+ "Puede ejecutar el mismo código varias veces mediante el uso de un ciclo.",
+ "Otro tipo de ciclo de JavaScript se llama un ciclo \"while\", ya que se ejecuta, \"mientras que\" algo sea cierto y se detiene una vez que ya no sea así.",
+ "var ourArray = [];
",
+ "var i = 0;
",
+ "while(i < 5) {
",
+ " ourArray.push(i);
",
+ " i++;
",
+ "}
",
+ "Intentemos que un ciclo while
empuje valores en un vector.",
+ "myArray
utilizando un ciclo while
."
+ ]
+ }
+ }
+ },
+
{
"id": "cf1111c1c11feddfaeb5bdef",
"title": "Iterate with JavaScript For Loops",
@@ -5277,56 +5328,6 @@
}
}
},
- {
- "id": "cf1111c1c11feddfaeb1bdef",
- "title": "Iterate with JavaScript While Loops",
- "description": [
- "You can run the same code multiple times by using a loop.",
- "Another type of JavaScript loop is called a \"while loop
\", because it runs \"while\" a specified condition is true and stops once that condition is no longer true.",
- "var ourArray = [];", - "Let's try getting a while loop to work by pushing values to an array.", - "
var i = 0;
while(i < 5) {
ourArray.push(i);
i++;
}
myArray
using a while
loop."
- ],
- "challengeSeed": [
- "// Setup",
- "var myArray = [];",
- "",
- "// Only change code below this line.",
- "",
- ""
- ],
- "tail": [
- "if(typeof myArray !== \"undefined\"){(function(){return myArray;})();}"
- ],
- "solutions": [
- "var myArray = [];\nvar i = 0;\nwhile(i < 5) {\n myArray.push(i);\n i++;\n}"
- ],
- "tests": [
- "assert(code.match(/while/g), 'message: You should be using a while
loop for this.');",
- "assert.deepEqual(myArray, [0,1,2,3,4], 'message: myArray
should equal [0,1,2,3,4]
.');"
- ],
- "type": "waypoint",
- "challengeType": 1,
- "translations": {
- "es": {
- "title": "Iterar con JavaScript con ciclos while",
- "description": [
- "Puede ejecutar el mismo código varias veces mediante el uso de un ciclo.",
- "Otro tipo de ciclo de JavaScript se llama un ciclo \"while\", ya que se ejecuta, \"mientras que\" algo sea cierto y se detiene una vez que ya no sea así.",
- "var ourArray = [];
",
- "var i = 0;
",
- "while(i < 5) {
",
- " ourArray.push(i);
",
- " i++;
",
- "}
",
- "Intentemos que un ciclo while
empuje valores en un vector.",
- "myArray
utilizando un ciclo while
."
- ]
- }
- }
- },
{
"id": "5688e62ea601b2482ff8422b",
"title": "Profile Lookup",