Sure! Here's an example of a simple game where you control a character to jump over spikes and hit blocks using JavaScript and HTML:
This game consists of a game area with a player, spike, and block. The player can jump by pressing the "ArrowUp" key. If the player hits the spike, the game ends and an alert message is shown. If the player hits the block, the color of the block changes randomly.
You can copy the above code into a single HTML file, save it with a `.html` extension, and open it in a web browser to play the game.