Sure, here's an example game written in JavaScript, enclosed in script tags within a single HTML file:
Click to stop the timer!
In this game, the player needs to click the screen to stop a timer. The game has a variable for the minimum time to stop (`minTime`) and a variable for the maximum time to stop (`maxTime`). If the time it took to stop the timer is between the minimum and maximum time, the player wins. The result is displayed in a text element with the id `result-text`. The timer text is displayed in an element with the id `timer-text`.