MCPcopy Create free account
hub / github.com/Vishal-raj-1/Awesome-JavaScript-Projects / jump

Function jump

assets/js/DinosaurGame.js:5–11  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3const score = document.getElementById("score");
4
5function jump(){
6 if(character.classList == "animate"){return}
7 character.classList.add("animate");
8 setTimeout(function(){
9 character.classList.remove("animate");
10 },500);
11}
12document.addEventListener('keypress', () => {
13 if(!character.classList.contains('animate')){
14 jump();

Callers 1

DinosaurGame.jsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected