JavaScript – Trying to move an image upon keyboard press

  javascript

I am just learning JavaScript coding and trying to move an image from left to right upon a keyboard press but unable to figure out the same.

I have defined the image individually in Father.js file and in the sketch.js file – I am trying to write the code to move the image.

Can anyone help please?

Here’s the link to the code – https://github.com/Salma-Siddiqua/Self-game-stage-2

Source: Ask Javascript Questions

LEAVE A COMMENT