Sure! Here's a simple implementation of the Snake game using JavaScript in a single HTML file:
To play the game, simply copy and paste the code into a new HTML file, and open it in a browser (preferably on a smartphone for a better experience). The game board will be displayed, and you can use the arrow keys (or swipe gestures on a smartphone) to control the snake. The objective is to eat the food and grow the snake without hitting the walls or itself. When the game is over, an alert will be shown, and you can restart the game by closing the alert. Enjoy the Snake game!