Sure! Here's an example of a simple text-based game called Love Letter, where you play as a girl in a school. It's implemented as a single HTML file, including JavaScript code enclosed in script tags.
To play the game, simply open the HTML file in a web browser, and it will prompt you to enter your name. Then, you can choose from different options mentioned in the prompts, and the game will respond accordingly. The game loop continues until you choose to end the game, at which point your total score will be displayed. Have fun playing Love Letter!