Skip to content

Commit 56718ef

Browse files
Clarify paddle controls tutorial instructions (mdn#43700)
* Fix paddle controls tutorial wording * Fix --------- Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
1 parent 4a873b9 commit 56718ef

File tree

1 file changed

+1
-1
lines changed
  • files/en-us/games/tutorials/2d_breakout_game_pure_javascript/paddle_and_keyboard_controls

1 file changed

+1
-1
lines changed

files/en-us/games/tutorials/2d_breakout_game_pure_javascript/paddle_and_keyboard_controls/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ let rightPressed = false;
4949
let leftPressed = false;
5050
```
5151

52-
The default value for both is `false` because at the beginning the control buttons are not pressed. To listen for key presses, we will set up two event listeners. Add the following lines just above the `setInterval()` line at the bottom of your JavaScript:
52+
The default value for both is `false` because at the beginning the control buttons are not pressed. To listen for key presses, we will set up two event listeners. Add the following lines just above the `drawBall` function definition:
5353

5454
```js
5555
document.addEventListener("keydown", keyDownHandler);

0 commit comments

Comments
 (0)