Change controls on my game?

I have a Flappy Bird game I made. How can I change the code so instead of hitting the spacebar, I click in order to make the player jump?

You can try to use the "click" event listener that will run a function everytime you clicked the canvas. You can even make it only jump if the left mouse button is pressed just by adding an event parameter into the function and do if(event.button === 0) { }or if(event.button === 1) { } on Internet Explorer.

How can I change the code so it does that?