merge staging and make my own minor improvements
This commit is contained in:
@ -22,8 +22,7 @@
|
|||||||
"assert(editor.getValue().match(/(\\/\\*)[\\w\\W]{5,}(?=\\*\\/)/gm), 'message: Create a <code>/* */</code> style comment that contains at least five letters.');",
|
"assert(editor.getValue().match(/(\\/\\*)[\\w\\W]{5,}(?=\\*\\/)/gm), 'message: Create a <code>/* */</code> style comment that contains at least five letters.');",
|
||||||
"assert(editor.getValue().match(/(\\*\\/)/g), 'message: Make sure that you close the comment with a <code>*/</code>');"
|
"assert(editor.getValue().match(/(\\*\\/)/g), 'message: Make sure that you close the comment with a <code>*/</code>');"
|
||||||
],
|
],
|
||||||
"challengeSeed":[
|
"challengeSeed": [],
|
||||||
],
|
|
||||||
"type": "waypoint",
|
"type": "waypoint",
|
||||||
"challengeType": 1
|
"challengeType": 1
|
||||||
},
|
},
|
||||||
@ -791,13 +790,11 @@
|
|||||||
"description": [
|
"description": [
|
||||||
"You can run the same code multiple times by using a loop.",
|
"You can run the same code multiple times by using a loop.",
|
||||||
"The most common type of JavaScript loop is called a \"for loop\" because it runs \"for\" a specific number of times.",
|
"The most common type of JavaScript loop is called a \"for loop\" because it runs \"for\" a specific number of times.",
|
||||||
"",
|
|
||||||
"For loops are declared with three optional expressions seperated by semicolons:",
|
"For loops are declared with three optional expressions seperated by semicolons:",
|
||||||
"<code>for([initialization]; [condition]; [final-expression])</code>",
|
"<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 varaible.",
|
"The <code>initialization</code> statement is executed one time only before the loop starts. It is typically used to define and setup your loop varaible.",
|
||||||
"The <code>condition</code> statement is evaluated at the beginning of every loop and will continue as long as it evalutes <code>true</code>. When <code>condition</code> is <code>false</code> at the start of the loop, the loop will stop executing. This means if <code>condition</code> starts as <code>false</code>, your loop will never execute.",
|
"The <code>condition</code> statement is evaluated at the beginning of every loop and will continue as long as it evalutes <code>true</code>. When <code>condition</code> is <code>false</code> at the start of the loop, the loop will stop executing. This means if <code>condition</code> starts as <code>false</code>, your loop will never execute.",
|
||||||
"The <code>final-expression</code> is executed at the end of each loop iteration, prior to the next <code>condition</code> check and is usually used to increment or decrement your loop counter.",
|
"The <code>final-expression</code> is executed at the end of each loop iteration, prior to the next <code>condition</code> check and is usually used to increment or decrement your loop counter.",
|
||||||
"",
|
|
||||||
"We'll initialize with <code>i = 0</code> and loop while our condition <code>i < 5</code> is true. We'll increment <code>i</code> by 1 each loop with <code>i++</code> as our <code>final-expression</code>.",
|
"We'll initialize with <code>i = 0</code> and loop while our condition <code>i < 5</code> is true. We'll increment <code>i</code> by 1 each loop with <code>i++</code> as our <code>final-expression</code>.",
|
||||||
"<code>var ourArray = [];</code>",
|
"<code>var ourArray = [];</code>",
|
||||||
"<code>for(var i = 0; i < 5; i++) {</code>",
|
"<code>for(var i = 0; i < 5; i++) {</code>",
|
||||||
@ -812,6 +809,7 @@
|
|||||||
],
|
],
|
||||||
"challengeSeed": [
|
"challengeSeed": [
|
||||||
"var ourArray = [];",
|
"var ourArray = [];",
|
||||||
|
"",
|
||||||
"for(var i = 0; i < 5; i++){",
|
"for(var i = 0; i < 5; i++){",
|
||||||
" ourArray.push(i);",
|
" ourArray.push(i);",
|
||||||
"}",
|
"}",
|
||||||
@ -824,8 +822,7 @@
|
|||||||
"// Only change code above this line.",
|
"// Only change code above this line.",
|
||||||
"// We use this function to show you the value of your variable in your output box.",
|
"// We use this function to show you the value of your variable in your output box.",
|
||||||
"// You'll learn about functions soon.",
|
"// You'll learn about functions soon.",
|
||||||
"if(typeof(myArray) !== \"undefined\"){(function(){return myArray;})();}",
|
"if(typeof(myArray) !== \"undefined\"){(function(){return myArray;})();}"
|
||||||
""
|
|
||||||
],
|
],
|
||||||
"type": "waypoint",
|
"type": "waypoint",
|
||||||
"challengeType": 1
|
"challengeType": 1
|
||||||
@ -849,10 +846,12 @@
|
|||||||
"assert.deepEqual(myArray, [1,3,5,7,9], 'message: <code>myArray</code> should equal [1,3,5,7,9].');"
|
"assert.deepEqual(myArray, [1,3,5,7,9], 'message: <code>myArray</code> should equal [1,3,5,7,9].');"
|
||||||
],
|
],
|
||||||
"challengeSeed": [
|
"challengeSeed": [
|
||||||
"ourArray = [];",
|
"var ourArray = [];",
|
||||||
|
"",
|
||||||
"for(var i = 1; i < 10; i += 2){",
|
"for(var i = 1; i < 10; i += 2){",
|
||||||
" ourArray.push(i);",
|
" ourArray.push(i);",
|
||||||
"}",
|
"}",
|
||||||
|
"",
|
||||||
"var myArray = [];",
|
"var myArray = [];",
|
||||||
"",
|
"",
|
||||||
"// Only change code below this line.",
|
"// Only change code below this line.",
|
||||||
@ -889,10 +888,12 @@
|
|||||||
"assert.deepEqual(myArray, [9,7,5,3,1], 'message: <code>myArray</code> should equal [9,7,5,3,1].');"
|
"assert.deepEqual(myArray, [9,7,5,3,1], 'message: <code>myArray</code> should equal [9,7,5,3,1].');"
|
||||||
],
|
],
|
||||||
"challengeSeed": [
|
"challengeSeed": [
|
||||||
"ourArray = [];",
|
"var ourArray = [];",
|
||||||
|
"",
|
||||||
"for(var i = 9; i > 0; i -= 2){",
|
"for(var i = 9; i > 0; i -= 2){",
|
||||||
" ourArray.push(i);",
|
" ourArray.push(i);",
|
||||||
"}",
|
"}",
|
||||||
|
"",
|
||||||
"var myArray = [];",
|
"var myArray = [];",
|
||||||
"",
|
"",
|
||||||
"// Only change code below this line.",
|
"// Only change code below this line.",
|
||||||
@ -1085,7 +1086,7 @@
|
|||||||
"difficulty": "9.984",
|
"difficulty": "9.984",
|
||||||
"description": [
|
"description": [
|
||||||
"<code>Regular expressions</code> are used to find certain words or patterns inside of <code>strings</code>.",
|
"<code>Regular expressions</code> are used to find certain words or patterns inside of <code>strings</code>.",
|
||||||
"For example, if we wanted to find the word <code>the</code> in the string <code>The dog chased the cat</code>, we could use the following <code>regular expression</code>: <code>\/the\/gi</code>",
|
"For example, if we wanted to find the word <code>the</code> in the string <code>The dog chased the cat</code>, we could use the following <code>regular expression</code>: <code>/the/gi</code>",
|
||||||
"Let's break this down a bit:",
|
"Let's break this down a bit:",
|
||||||
"<code>the</code> is the pattern we want to match.",
|
"<code>the</code> is the pattern we want to match.",
|
||||||
"<code>g</code> means that we want to search the entire string for this pattern instead of just the first match.",
|
"<code>g</code> means that we want to search the entire string for this pattern instead of just the first match.",
|
||||||
|
Reference in New Issue
Block a user