Merge pull request #5694 from ltegman/fix/basic-javascript-spacing

Fix sentence spacing
This commit is contained in:
Rex Schrader
2016-01-01 00:14:47 -08:00

View File

@ -17,7 +17,7 @@
"Try creating one of each type of comment." "Try creating one of each type of comment."
], ],
"challengeSeed": [ "challengeSeed": [
" " ""
], ],
"solutions": [ "solutions": [
"// Fake Comment\n/* Another Comment */" "// Fake Comment\n/* Another Comment */"
@ -45,7 +45,7 @@
"", "",
"// Only change code below this line.", "// Only change code below this line.",
"", "",
" return false; // Change this line", "return false; // Change this line",
"", "",
"// Only change code above this line.", "// Only change code above this line.",
"}" "}"
@ -465,7 +465,7 @@
"id": "cf1391c1c11feddfaeb4bdef", "id": "cf1391c1c11feddfaeb4bdef",
"title": "Create Decimal Numbers with JavaScript", "title": "Create Decimal Numbers with JavaScript",
"description": [ "description": [
"We can store decimal numbers in variables too. Decimal numbers are sometimes refered to as <dfn>floating point</dfn> numbers or <dfn>floats</dfn>. ", "We can store decimal numbers in variables too. Decimal numbers are sometimes refered to as <dfn>floating point</dfn> numbers or <dfn>floats</dfn>.",
"<strong>Note</strong>", "<strong>Note</strong>",
"Not all real numbers can accurately be represented in <dfn>floating point</dfn>. This can lead to rounding errors. <a href=\"https://en.wikipedia.org/wiki/Floating_point#Accuracy_problems\" target=\"_blank\">Details Here</a>.", "Not all real numbers can accurately be represented in <dfn>floating point</dfn>. This can lead to rounding errors. <a href=\"https://en.wikipedia.org/wiki/Floating_point#Accuracy_problems\" target=\"_blank\">Details Here</a>.",
"<h4>Instructions</h4>", "<h4>Instructions</h4>",
@ -548,11 +548,11 @@
"id": "56533eb9ac21ba0edf2244ae", "id": "56533eb9ac21ba0edf2244ae",
"title": "Finding a Remainder in Javascript", "title": "Finding a Remainder in Javascript",
"description": [ "description": [
"The <dfn>remainder</dfn> operator <code>%</code> gives the remainder of the division of two numbers. ", "The <dfn>remainder</dfn> operator <code>%</code> gives the remainder of the division of two numbers.",
"<strong>Example</strong>", "<strong>Example</strong>",
"<blockquote>5 % 2 = 1 because<br>Math.floor(5 / 2) = 2 (Quotient)<br>2 * 2 = 4<br>5 - 4 = 1 (Remainder)</blockquote>", "<blockquote>5 % 2 = 1 because<br>Math.floor(5 / 2) = 2 (Quotient)<br>2 * 2 = 4<br>5 - 4 = 1 (Remainder)</blockquote>",
"<strong>Usage</strong>", "<strong>Usage</strong>",
"In mathematics, a number can be checked even or odd by checking the remainder of the division of the number by <code>2</code>. ", "In mathematics, a number can be checked even or odd by checking the remainder of the division of the number by <code>2</code>.",
"<blockquote>17 % 2 = 1 (17 is Odd)<br>48 % 2 = 0 (48 is Even)</blockquote>", "<blockquote>17 % 2 = 1 (17 is Odd)<br>48 % 2 = 0 (48 is Even)</blockquote>",
"<strong>Note</strong>", "<strong>Note</strong>",
"The <dfn>remainder</dfn> operator is sometimes incorrectly refered to as the \"modulus\" operator. It is very similar to modulus, but does not work properly with negative numbers.", "The <dfn>remainder</dfn> operator is sometimes incorrectly refered to as the \"modulus\" operator. It is very similar to modulus, but does not work properly with negative numbers.",
@ -1379,8 +1379,8 @@
"id": "56533eb9ac21ba0edf2244bb", "id": "56533eb9ac21ba0edf2244bb",
"title": "Word Blanks", "title": "Word Blanks",
"description": [ "description": [
"We will now use our knowledge of strings to build a \"<a href='https://en.wikipedia.org/wiki/Mad_Libs' target='_blank'>Mad Libs</a>\" style word game we're calling \"Word Blanks\". You will create an (optionally humorous) \"Fill in the Blanks\" style sentence. ", "We will now use our knowledge of strings to build a \"<a href='https://en.wikipedia.org/wiki/Mad_Libs' target='_blank'>Mad Libs</a>\" style word game we're calling \"Word Blanks\". You will create an (optionally humorous) \"Fill in the Blanks\" style sentence.",
"You will need to use string operators to build a new string, <code>result</code>, using the provided variables: <code>myNoun</code>, <code>myAdjective</code>, <code>myVerb</code>, and <code>myAdverb</code>. ", "You will need to use string operators to build a new string, <code>result</code>, using the provided variables: <code>myNoun</code>, <code>myAdjective</code>, <code>myVerb</code>, and <code>myAdverb</code>.",
"You will also need to provide additional strings, which will not change, in between the provided words.", "You will also need to provide additional strings, which will not change, in between the provided words.",
"We have provided a framework for testing your results with different words. The tests will run your function with several different inputs to make sure all of the provided words appear in the output, as well as your extra strings." "We have provided a framework for testing your results with different words. The tests will run your function with several different inputs to make sure all of the provided words appear in the output, as well as your extra strings."
], ],
@ -1731,7 +1731,7 @@
"id": "56533eb9ac21ba0edf2244bc", "id": "56533eb9ac21ba0edf2244bc",
"title": "Shopping List", "title": "Shopping List",
"description": [ "description": [
"Create a shopping list in the variable <code>myList</code>. The list should be a multi-dimensional array containing several sub-arrays. ", "Create a shopping list in the variable <code>myList</code>. The list should be a multi-dimensional array containing several sub-arrays.",
"The first element in each sub-array should contain a string with the name of the item. The second element should be a number representing the quantity i.e.", "The first element in each sub-array should contain a string with the name of the item. The second element should be a number representing the quantity i.e.",
"<code>[\"Chocolate Bar\", 15]</code>", "<code>[\"Chocolate Bar\", 15]</code>",
"There should be at least 5 sub-arrays in the list." "There should be at least 5 sub-arrays in the list."
@ -1846,7 +1846,7 @@
"id": "56533eb9ac21ba0edf2244bd", "id": "56533eb9ac21ba0edf2244bd",
"title": "Passing Values to Functions with Arguments", "title": "Passing Values to Functions with Arguments",
"description": [ "description": [
"Functions can take input with <dfn>parameters</dfn>. Parameters are local variables that take on the value of the <dfn>arguments</dfn> which are passed into the function. ", "Functions can take input with <dfn>parameters</dfn>. Parameters are local variables that take on the value of the <dfn>arguments</dfn> which are passed into the function.",
"Here is a function with two parameters, <code>param1</code> and <code>param2</code>:", "Here is a function with two parameters, <code>param1</code> and <code>param2</code>:",
"<blockquote>function testFun(param1, param2) {<br> console.log(param1, param2);<br>}</blockquote>", "<blockquote>function testFun(param1, param2) {<br> console.log(param1, param2);<br>}</blockquote>",
"Then we can call <code>testFun</code>:", "Then we can call <code>testFun</code>:",
@ -1985,7 +1985,7 @@
"id": "56533eb9ac21ba0edf2244bf", "id": "56533eb9ac21ba0edf2244bf",
"title": "Local Scope and Functions", "title": "Local Scope and Functions",
"description": [ "description": [
"Variables which are declared within a function, as well as the function parameters have <dfn>local</dfn> scope. That means, they are only visible within that function. ", "Variables which are declared within a function, as well as the function parameters have <dfn>local</dfn> scope. That means, they are only visible within that function.",
"Here is a function <code>myTest</code> with a local variable called <code>loc</code>.", "Here is a function <code>myTest</code> with a local variable called <code>loc</code>.",
"<blockquote>function myTest() {<br> var loc = \"foo\";<br> console.log(loc);<br>}<br>myTest(); // \"foo\"<br>console.log(loc); // \"undefined\"</blockquote>", "<blockquote>function myTest() {<br> var loc = \"foo\";<br> console.log(loc);<br>}<br>myTest(); // \"foo\"<br>console.log(loc); // \"undefined\"</blockquote>",
"<code>loc</code> is not defined outside of the function.", "<code>loc</code> is not defined outside of the function.",
@ -2929,7 +2929,7 @@
"id": "56533eb9ac21ba0edf2244dd", "id": "56533eb9ac21ba0edf2244dd",
"title": "Selecting from many options with Switch Statements", "title": "Selecting from many options with Switch Statements",
"description": [ "description": [
"If you have many options to choose from, use a <code>switch</code> statement. A <code>switch</code> statement tests a value and can have many <code>case</code> statements which defines various possible values. Statements are executed from the first matched <code>case</code> value until a <code>break</code> is encountered. ", "If you have many options to choose from, use a <code>switch</code> statement. A <code>switch</code> statement tests a value and can have many <code>case</code> statements which defines various possible values. Statements are executed from the first matched <code>case</code> value until a <code>break</code> is encountered.",
"Here is a <dfn>pseudocode</dfn> example:", "Here is a <dfn>pseudocode</dfn> example:",
"<blockquote>switch (num) {<br> case value1:<br> statement1;<br> break;<br> case value2:<br> statement2;<br> break;<br>...<br> case valueN:<br> statementN;<br> break;<br>}</blockquote>", "<blockquote>switch (num) {<br> case value1:<br> statement1;<br> break;<br> case value2:<br> statement2;<br> break;<br>...<br> case valueN:<br> statementN;<br> break;<br>}</blockquote>",
"<code>case</code> values are tested with strict equality (<code>===</code>). The <code>break</code> tells JavaScript to stop executing statements. If the <code>break</code> is omitted, the next statement will be executed.", "<code>case</code> values are tested with strict equality (<code>===</code>). The <code>break</code> tells JavaScript to stop executing statements. If the <code>break</code> is omitted, the next statement will be executed.",
@ -3227,7 +3227,7 @@
"id": "565bbe00e9cc8ac0725390f4", "id": "565bbe00e9cc8ac0725390f4",
"title": "Counting Cards", "title": "Counting Cards",
"description": [ "description": [
"In the casino game Blackjack, a player can gain an advantage over the house by keeping track of the relative number of high and low cards remaining in the deck. This is called <a href=\"https://en.wikipedia.org/wiki/Card_counting\">Card Counting</a>. ", "In the casino game Blackjack, a player can gain an advantage over the house by keeping track of the relative number of high and low cards remaining in the deck. This is called <a href=\"https://en.wikipedia.org/wiki/Card_counting\">Card Counting</a>.",
"Having more high cards remaining in the deck favors the player. Each card is assigned a value according to the table below. When the count is positive, the player should bet high. When the count is zero or negative, the player should bet low.", "Having more high cards remaining in the deck favors the player. Each card is assigned a value according to the table below. When the count is positive, the player should bet high. When the count is zero or negative, the player should bet low.",
"<table class=\"table table-striped\"><thead><tr><th>Value</th><th>Cards</th></tr></thead><tbody><tr><td>+1</td><td>2, 3, 4, 5, 6</td></tr><tr><td>0</td><td>7, 8, 9</td></tr><tr><td>-1</td><td>10, 'J', 'Q', 'K','A'</td></tr></tbody></table>", "<table class=\"table table-striped\"><thead><tr><th>Value</th><th>Cards</th></tr></thead><tbody><tr><td>+1</td><td>2, 3, 4, 5, 6</td></tr><tr><td>0</td><td>7, 8, 9</td></tr><tr><td>-1</td><td>10, 'J', 'Q', 'K','A'</td></tr></tbody></table>",
"You will write a card counting function. It will receive a <code>card</code> parameter and increment or decrement the global <code>count</code> variable according to the card's value (see table). The function will then return the current count and the string <code>\"Bet\"</code> if the count is positive, or <code>\"Hold\"</code> if the count is zero or negative.", "You will write a card counting function. It will receive a <code>card</code> parameter and increment or decrement the global <code>count</code> variable according to the card's value (see table). The function will then return the current count and the string <code>\"Bet\"</code> if the count is positive, or <code>\"Hold\"</code> if the count is zero or negative.",
@ -3246,7 +3246,7 @@
" // Only change code above this line", " // Only change code above this line",
"}", "}",
"", "",
"// Add/remove calls to test your function. ", "// Add/remove calls to test your function.",
"// Note: Only the last will display", "// Note: Only the last will display",
"cc(2); cc(3); cc(7); cc('K'); cc('A');" "cc(2); cc(3); cc(7); cc('K'); cc('A');"
], ],
@ -3505,7 +3505,7 @@
"id": "bg9999c9c99feedfaeb9bdef", "id": "bg9999c9c99feedfaeb9bdef",
"title": "Add New Properties to a JavaScript Object", "title": "Add New Properties to a JavaScript Object",
"description": [ "description": [
"You can add new properties to existing JavaScript objects the same way you would modify them. ", "You can add new properties to existing JavaScript objects the same way you would modify them.",
"Here's how we would add a <code>\"bark\"</code> property to <code>ourDog</code>:", "Here's how we would add a <code>\"bark\"</code> property to <code>ourDog</code>:",
"<code>ourDog.bark = \"bow-wow\";</code> ", "<code>ourDog.bark = \"bow-wow\";</code> ",
"or", "or",
@ -4193,7 +4193,7 @@
"id": "56533eb9ac21ba0edf2244e2", "id": "56533eb9ac21ba0edf2244e2",
"title": "Caesar's Cipher", "title": "Caesar's Cipher",
"description": [ "description": [
"One of the simplest and most widely known <dfn>ciphers</dfn> is a <code>Caesar cipher</code>, also known as a <code>shift cipher</code>. In a <code>shift cipher</code> the meanings of the letters are shifted by some set amount. ", "One of the simplest and most widely known <dfn>ciphers</dfn> is a <code>Caesar cipher</code>, also known as a <code>shift cipher</code>. In a <code>shift cipher</code> the meanings of the letters are shifted by some set amount.",
"A common modern use is the <a href=\"https://en.wikipedia.org/wiki/ROT13\">ROT13</a> cipher, where the values of the letters are shifted by 13 places. Thus 'A' &harr; 'N', 'B' &harr; 'O' and so on.", "A common modern use is the <a href=\"https://en.wikipedia.org/wiki/ROT13\">ROT13</a> cipher, where the values of the letters are shifted by 13 places. Thus 'A' &harr; 'N', 'B' &harr; 'O' and so on.",
"Write a function which takes a <code>ROT13</code> encoded string as input and returns a decoded string. All letters will be uppercase. Do not transform any non-alphabetic character (i.e. spaces, punctuation), but do pass them on.", "Write a function which takes a <code>ROT13</code> encoded string as input and returns a decoded string. All letters will be uppercase. Do not transform any non-alphabetic character (i.e. spaces, punctuation), but do pass them on.",
"The provided code transforms the input into an array for you, <code>codeArr</code>. Place the decoded values into the <code>decodedArr</code> array where the provided code will transform it back into a string." "The provided code transforms the input into an array for you, <code>codeArr</code>. Place the decoded values into the <code>decodedArr</code> array where the provided code will transform it back into a string."