mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-06-19 21:09:51 +08:00
chore(curriculum): remove before user code in RPS game (#60723)
This commit is contained in:
parent
2bb4c5565c
commit
ee681ff4ad
@ -11,6 +11,16 @@ If the player or computer has won the game, there should be an option to reset t
|
||||
|
||||
Add an event listener to the `resetGameBtn` button. Your event listener should take in a `"click"` event and a reference to the `resetGame` function.
|
||||
|
||||
# --before-all--
|
||||
|
||||
```js
|
||||
let testMsg;
|
||||
function resetGame() {
|
||||
// this is just to test the event listener
|
||||
testMsg = "Game has been reset";
|
||||
}
|
||||
```
|
||||
|
||||
# --hints--
|
||||
|
||||
You should add an event listener to the `resetGameBtn` button. The event listener should take in a `"click"` event and a reference to the `resetGame` function.
|
||||
@ -22,16 +32,6 @@ assert.strictEqual(testMsg, "Game has been reset");
|
||||
|
||||
# --seed--
|
||||
|
||||
## --before-user-code--
|
||||
|
||||
```js
|
||||
let testMsg;
|
||||
function resetGame() {
|
||||
// this is just to test the event listener
|
||||
testMsg = "Game has been reset";
|
||||
}
|
||||
```
|
||||
|
||||
## --seed-contents--
|
||||
|
||||
```html
|
||||
|
||||
Loading…
Reference in New Issue
Block a user