From a7b3b80c49e7a99aeb1683ac752f33c751af9bb1 Mon Sep 17 00:00:00 2001 From: recurza Date: Wed, 19 Oct 2016 12:46:42 +0800 Subject: [PATCH] Switched order of JS for loop and while loop courses --- .../basic-javascript.json | 101 +++++++++--------- 1 file changed, 51 insertions(+), 50 deletions(-) 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 = [];
var i = 0;
while(i < 5) {
ourArray.push(i);
i++;
}
", + "Let's try getting a while loop to work by pushing values to an array.", + "

Instructions

", + "Push the numbers 0 through 4 to 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.", + "

Instrucciones

", + "Empuja los números de 0 a 4 para 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 = [];
var i = 0;
while(i < 5) {
ourArray.push(i);
i++;
}
", - "Let's try getting a while loop to work by pushing values to an array.", - "

Instructions

", - "Push the numbers 0 through 4 to 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.", - "

Instrucciones

", - "Empuja los números de 0 a 4 para myArray utilizando un ciclo while." - ] - } - } - }, { "id": "5688e62ea601b2482ff8422b", "title": "Profile Lookup",