Sure! Here's an example of a simple game where you tap to make a character jump, hold to keep jumping, and touching spikes results in a game over. The game is implemented as a single HTML file with JavaScript code enclosed in script tags:
Score: 0
To play the game, simply save the above code as an HTML file (e.g., "game.html") and open it in a web browser or a smartphone's web browser. Tap or click to make the character jump, hold to keep jumping, and avoid touching the red spike. The score is displayed at the top. When you touch the spike, a game over alert will appear showing your final score.