Sure! Here's an example of a simple endless runner game implemented as a single HTML file with JavaScript code enclosed in script tags:
This game creates a canvas where it draws a player object as a blue circle that can jump. The player can jump once by pressing the up arrow key. The game loop continuously redraws the game elements on the canvas to create the illusion of animation.
Feel free to modify and enhance the game according to your preferences!