I've been having a hard time in this bootcamp. Feel like I'm behind.
We've covered dom manipulation with Javascript.
Also map, reduce, and filter.
We're working on this an assignment where you have to assign key presses to 2 squares in order to make them race across the screen. And I don't understand how to implement the javascript. shyt is terrible or maybe I am. I dunno anymore.
Before trying to implement the code syntax, think about the outcome that you are targeting. Then ask logically what is going on behind the scenes in order to achieve that. The code is always the last step in the process.
So ask, "What is really happening for the squares to 'race' across the screen?" Then think about some code for that.
Ask, "What really happens when I 'press a key'?" What type of
event is really going on? Then think of some code that could handle that.
Then consider how those two aspects relate to one another. How to sequentially relate them one to another.