Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const score = document.querySelector('.score'),
- start = document.querySelector('.start'),
- gameArea = document.querySelector('.gameArea');
- start.addEventListener('click', startGame);
- document.addEventListener('keydown', startRun);
- document.addEventListener('keyup', stopRun);
- function startGame(){
- start.classList.add('hide');
- }
- function startRun(event){
- console.log(event);
- }
- function stopRun(){
- console.log('stop');
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement