Sure, I can help you create a text-based choose your own adventure game using JavaScript enclosed in script tags within a single HTML file. Below is an example implementation with 10 possible endings:
Choose Your Adventure Game
You can copy the above code, save it as a .html file, and run it in any web browser to play the game. The game presents various scenarios and choices, and the player's decisions determine which scene they will encounter next. There are 10 possible endings, and the player can restart the game at any time.
Note: This is just a basic implementation to give you an idea of how to structure a choose your own adventure game using JavaScript. You can expand on it, add more scenes, storylines, and features as per your requirements.