diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3c2fccf186146b59c6e96.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3c2fccf186146b59c6e96.md index 160efd9ab1f..b9cee110857 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3c2fccf186146b59c6e96.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3c2fccf186146b59c6e96.md @@ -33,10 +33,10 @@ You should not use `let` or `const`. assert.notMatch(code, /(let|const)\s+button1\.onclick/); ``` -You should assign the `goStore` function reference to `button1.onclick`. +You should assign the `goStore` function reference to `button1.onclick`. Make sure not to call the function. ```js -assert.match(code, /button1\.onclick\s*=\s*goStore/); +assert.match(code, /button1\.onclick\s*=\s*goStore\s*;?\s*$/m); ``` # --seed-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3c4a0e52767482c5202d4.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3c4a0e52767482c5202d4.md index 797e0874c12..d0a38446729 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3c4a0e52767482c5202d4.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3c4a0e52767482c5202d4.md @@ -13,6 +13,12 @@ Once you have done that, open your console and try clicking the buttons on your # --hints-- +You should assign the `goStore` function reference to `button1.onclick`. Make sure not to call the function. + +```js +assert.match(code, /button1\.onclick\s*=\s*goStore\s*;?\s*$/m); +``` + You should use dot notation to access the `onclick` property of `button2`. ```js @@ -25,10 +31,10 @@ You should not use `let` or `const` to assign `button2.onclick`. assert.notMatch(code, /(let|const)\s+button2\.onclick/); ``` -You should set the `onclick` property of `button2` to the variable `goCave`. +You should assign the `goCave` function reference to `button2.onclick`. Make sure not to call the function. ```js -assert.match(code, /button2\.onclick\s*=\s*goCave/); +assert.match(code, /button2\.onclick\s*=\s*goCave\s*;?\s*$/m); ``` You should use dot notation to access the `onclick` property of `button3`. @@ -43,10 +49,10 @@ You should not use `let` or `const` to assign `button3.onclick`. assert.notMatch(code, /(let|const)\s+button3\.onclick/); ``` -You should set the `onclick` property of `button3` to the variable `fightDragon`. +You should assign the `fightDragon` function reference to `button3.onclick`. Make sure not to call the function. ```js -assert.match(code, /button3\.onclick\s*=\s*fightDragon/); +assert.match(code, /button3\.onclick\s*=\s*fightDragon\s*;?\s*$/m); ``` # --seed--