merge staging and make my own minor improvements

This commit is contained in:
Quincy Larson
2015-10-23 23:45:42 -07:00
parent dfe0ba1a7b
commit f6fe58e866

View File

@ -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(/(\\*\\/)/g), 'message: Make sure that you close the comment with a <code>*/</code>');"
],
"challengeSeed":[
],
"challengeSeed": [],
"type": "waypoint",
"challengeType": 1
},
@ -791,13 +790,11 @@
"description": [
"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.",
"",
"For loops are declared with three optional expressions seperated 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 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>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>.",
"<code>var ourArray = [];</code>",
"<code>for(var i = 0; i < 5; i++) {</code>",
@ -812,6 +809,7 @@
],
"challengeSeed": [
"var ourArray = [];",
"",
"for(var i = 0; i < 5; i++){",
" ourArray.push(i);",
"}",
@ -824,8 +822,7 @@
"// Only change code above this line.",
"// We use this function to show you the value of your variable in your output box.",
"// You'll learn about functions soon.",
"if(typeof(myArray) !== \"undefined\"){(function(){return myArray;})();}",
""
"if(typeof(myArray) !== \"undefined\"){(function(){return myArray;})();}"
],
"type": "waypoint",
"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].');"
],
"challengeSeed": [
"ourArray = [];",
"var ourArray = [];",
"",
"for(var i = 1; i < 10; i += 2){",
" ourArray.push(i);",
"}",
"",
"var myArray = [];",
"",
"// 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].');"
],
"challengeSeed": [
"ourArray = [];",
"var ourArray = [];",
"",
"for(var i = 9; i > 0; i -= 2){",
" ourArray.push(i);",
"}",
"",
"var myArray = [];",
"",
"// Only change code below this line.",
@ -1085,7 +1086,7 @@
"difficulty": "9.984",
"description": [
"<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:",
"<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.",