diff --git a/seed/challenges/basic-javascript.json b/seed/challenges/basic-javascript.json index a54c5dc47f..2c1927264a 100644 --- a/seed/challenges/basic-javascript.json +++ b/seed/challenges/basic-javascript.json @@ -423,7 +423,7 @@ "With JavaScript array variables, we can store several pieces of data in one place.", "You start an array declaration with an opening square bracket, end it with a closing square bracket, and put a comma between each entry, like this: var sandwich = [\"peanut butter\", \"jelly\", \"bread\"].", "Now let's create a new array called myArray that contains both a string and a number (in that order).", - "Refer to the comments if you get stuck." + "Refer to the commented code in the text editor if you get stuck." ], "tests": [ "assert(typeof(myArray) == 'object', 'myArray should be an array.');", @@ -450,7 +450,7 @@ "title": "Nest one Array within Another Array", "difficulty":"9.98161", "description":[ - "You can also nest arrays within other arrays, like this: [[\"Bulls\", 43]].", + "You can also nest arrays within other arrays, like this: [[\"Bulls\", 23]].", "Let's now go create a nested array called myArray." ], "tests":[ @@ -894,7 +894,7 @@ "", " return 0;", "", - "// 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.", @@ -944,8 +944,8 @@ "difficulty":"9.9829", "description":[ "We can use a certain mathematical expression to get a random number between two numbers.", - "Math.floor(Math.random() * (max - min + 1)) + min. More info about how it works here.", - "By using this we can control the output of a random number." + "Math.floor(Math.random() * (max - min + 1)) + min", + "By using this, we can control the output of a random number." ], "tests":[ "assert(myFunction() >= min, 'The random number that\\'s generated by myFunction should be greater than or equal to the minimum number');", @@ -972,20 +972,19 @@ }, { "id":"cf1111c1c12feddfaeb3bdef", - "title": "Use Conditional Logic with If-Else Statements", + "title": "Use Conditional Logic with If and Else Statements", "difficulty":"9.983", "description":[ - "We can use if statements in JavaScript to only execute code if a certain condition is met.", - "if statements require some sort of boolean condition to evaluate.", - "Example:", + "We can use if statements in JavaScript to only execute code if a certain condition is met.", + "if statements require some sort of boolean condition to evaluate.", + "For example:", " if (1 === 2) {", "  return true;", - "}", - "else {", + "} else {", "  return false;", "}", "Let's use if and else statements to make a coin-flip game.", - "Create an if-else statement to return heads if the flip var is zero, or else return tails if it's not." + "Create if and else statements to return the string \"heads\" if the flip variable is zero, or else return the string \"tails\" if the flip variable is not zero." ], "tests":[ "assert((function(){var result = myFunction();if(result === 'heads' || result === 'tails'){return true;} else {return false;}})(), 'myFunction should either return heads or tails.');", @@ -1022,8 +1021,8 @@ "the is the pattern we want to match.", "g means that we want to search the entire string for this pattern instead of just the first match.", "i means that we want to ignore the case (uppercase or lowercase) when searching for the pattern.", - "Regular expressions are written by surrounding the pattern with a / symbol.", - "Let's try selecting all the occurrences of the word and in the string George Boole and Alan Turing went to the shop and got some milk. We can do this by replacing the . part of our regular expression with the current regular expression with the word and." + "Regular expressions are written by surrounding the pattern with / symbols.", + "Let's try selecting all the occurrences of the word and in the string Ada Lovelace and Charles Babbage designed the first computer and the software that would have run on it. We can do this by replacing the . part of our regular expression with the current regular expression with the word and." ], "tests":[ "assert(test==2, 'Your regular expression should find two occurrences of the word and.');", @@ -1031,8 +1030,8 @@ ], "challengeSeed":[ "var test = (function() {", - " var testString = \"George Boole and Alan Turing went to the shop and got some milk\";", - " var expressionToGetMilk = /milk/gi;", + " var testString = \"Ada Lovelace and Charles Babbage designed the first computer and the software that would have run on it.\";", + " var expressionToGetSoftware = /software/gi;", " // Only change code below this line.", "", " var expression = /./gi;",