diff --git a/challenges/01-front-end-development-certification/basic-javascript.json b/challenges/01-front-end-development-certification/basic-javascript.json index 579fd5c4c9..b8327023d1 100644 --- a/challenges/01-front-end-development-certification/basic-javascript.json +++ b/challenges/01-front-end-development-certification/basic-javascript.json @@ -1759,7 +1759,7 @@ "Example", "
var arr = [
[1,2,3],
[4,5,6],
[7,8,9],
[[10,11,12], 13, 14]
];
arr[0]; // equals [1,2,3]
arr[1][2]; // equals 6
arr[3][0][1]; // equals 11
", "

Instructions

", - "Read from myArray using bracket notation so that myData is equal to 8" + "Using bracket notation select an element from myArray such that myData is equal to 8." ], "releasedOn": "January 1, 2016", "challengeSeed": [ @@ -1778,7 +1778,8 @@ ], "tests": [ "assert(myData === 8, 'message: myData should be equal to 8.');", - "assert(/myArray\\[2\\]\\[1\\]/g.test(code), 'message: You should be using bracket notation to read the value from myArray.');" + "assert(/myArray\\[\\d+\\]\\[\\d+\\]/g.test(code), 'message: You should be using bracket notation to read the value from myArray.');", + "assert(/myData\\s*?=\\s*?myArray\\[\\d+\\]\\[\\d+\\]\\s*?;/g.test(code), 'message: You should only be reading one value from myArray.');" ], "type": "waypoint", "challengeType": 1,