Sure! Here's an example of a simple game where you control a square box and can jump and move it using JavaScript. The game will be playable within a single HTML file and will include JavaScript code enclosed in script tags:
In this game, you control a blue box (player) within a game canvas. You can use the left (keyCode: 37) and right (keyCode: 39) arrow keys to move the box horizontally within the canvas. To make the box jump, simply click anywhere on the screen. The box will jump up to a specified height (100 units) and then fall back down.