Sure! Here's a sample game implemented as a single HTML file with JavaScript that resembles a simplified version of Super Mario Bros where Bowser is chasing the player and spawning enemies:
To play the game, copy and paste the above code into a new HTML file and save it with a .html extension. Then, open the HTML file in a web browser, and you should see the game running. Use the arrow keys to move the player character (Mario) and try to avoid the enemies that Bowser spawns. If the player collides with an enemy, the game will prompt a "Game Over" message.