diff --git a/challenges/basic-javascript.json b/challenges/basic-javascript.json index 92cb7d80e1..319ae35809 100644 --- a/challenges/basic-javascript.json +++ b/challenges/basic-javascript.json @@ -157,16 +157,19 @@ "Try looking at the firstLetterOfFirstName variable declaration if you get stuck." ], "tests": [ - "assert((function(){if(typeof(firstLetterOfLastName) != 'undefined' && typeof(firstLetterOfLastName) == 'string' && firstLetterOfLastName == 'C'){return(true);}else{return(false);}})(), 'The first letter of firstLetterOfLastName should be a C');" + "assert((function(){if(typeof(firstLetterOfLastName) != 'undefined' && editor.getValue().match(/\\[0\\]/gi) && typeof(firstLetterOfLastName) == 'string' && firstLetterOfLastName == 'C'){return(true);}else{return(false);}})(), 'The first letter of firstLetterOfLastName should be a C');" ], "challengeSeed": [ + "var firstLetterOfLastName = \"\"", + "var firstLetterOfLastName = \"\"", + "", "var firstName = \"Madeline\";", "", - "var firstLetterOfFirstName = firstName[0];", + "firstLetterOfFirstName = firstName[0];", "", "var lastName = \"Chen\";", "", - "var firstLetterOfLastName = lastName;", + "firstLetterOfLastName = lastName;", "", "", "// You can ignore this.", @@ -565,7 +568,7 @@ "difficulty": "9.9818", "description": [ "", - "Now that we've learn how to pop things from the end of the array, we need to learn how to push stuff back to the end", + "Now that we've learned how to pop things from the end of the array, we need to learn how to push stuff back to the end", "Let's take the code we had last time and push this value to the end: ['dog', 3] " ], "tests": [ @@ -797,7 +800,7 @@ "description":[ "", "Loops are a critical part of any program! The next few challenges", - "first we will be taking a look at the for loop", + "first we will be taking a look at the while loop", "", "var ourArray = [];", "var i = 0;",