diff --git a/seed/challenges/01-front-end-development-certification/basic-javascript.json b/seed/challenges/01-front-end-development-certification/basic-javascript.json index d8950574a6..73c8ba156d 100644 --- a/seed/challenges/01-front-end-development-certification/basic-javascript.json +++ b/seed/challenges/01-front-end-development-certification/basic-javascript.json @@ -1673,7 +1673,7 @@ "Example", "
var array = [1,2,3];", "
array[0]; // equals 1
var data = array[1]; // equals 2
myData
and set it to equal the first value of myArray
."
+ "Create a variable called myData
and set it to equal the first value of myArray
using bracket notation."
],
"challengeSeed": [
"// Example",
@@ -1693,7 +1693,8 @@
"var myArray = [1,2,3];\nvar myData = myArray[0];"
],
"tests": [
- "assert((function(){if(typeof myArray != 'undefined' && typeof myData != 'undefined' && myArray[0] === myData){return true;}else{return false;}})(), 'message: The variable myData
should equal the first value of myArray
.');"
+ "assert((function(){if(typeof myArray !== 'undefined' && typeof myData !== 'undefined' && myArray[0] === myData){return true;}else{return false;}})(), 'message: The variable myData
should equal the first value of myArray
.');",
+ "assert((function(){if(code.match(/\\s*=\\s*myArray\\[0\\]/g)){return true;}else{return false;}})(), 'message: The data in variable myArray
should be accessed using bracket notation.');"
],
"type": "waypoint",
"challengeType": 1,