There are currently no frequently asked questions associated with this exercise – that’s where you come in! You can contribute to this section by offering your own questions, answers, or clarifications on this exercise. Ask or answer a question by clicking reply () below.
If you’ve had an “aha” moment about the concepts, formatting, syntax, or anything else with this exercise, consider sharing those insights! Teaching others and answering their questions is one of the best ways to learn and stay sharp.
Join the Discussion. Help a fellow learner on their journey.
Ask or answer a question about this exercise by clicking reply () below!
Agree with a comment or answer? Like () to up-vote the contribution!
Run your code and play around with the keyboard events to make the ball bounce on the platform. You can try keys like the space bar, letter keys or number keys!
can anyone help with the terminology for assigning this to a certain key, like W (as in w,a,s,d) …or the Space bar / Up Arrow / whathaveyou
have googled, but getting lots of conflicting keypress advice (now deprecated apparently!), and also advice about keycodes
(An example in the hint would have been handy, as the instruction does tell you try this)
you need to make ball.onkeydown and ball.onkeyup
they don’t explain well, but you gotta add ‘on’ to the event object properties…
but inside he addEventListener(‘keyup’ ) without the “on”
Why function works before we press the keyboard if we put parentheses at the function after onkeyboard?
How can I make the function makes ball get higher and higher by pressing the button?
I tried to achieve it by using += 1, but what we put in the up function is string, so found it doesn’t work.
Why does it work for only one time? It doesn’t work from second time I press the keyboard.
I’m pretty sure there’s someone who also has same question with me.