Code Your Own Adventure!

You have some programming skills. Time to make something you can show people! We're going to show you how to program a 'code your own adventure' game. It'll have a basic story line, have the user make some choices, and have a happy ending. Then you can modify it as you wish and show off your creative talents!

One note before we begin. Each of the following exercises will ask you to add on to your previous code. Make sure not to delete or change anything that you did in a previous exercise. Good luck!

  1. It's always polite to ask your user if they are ready to play.
  2. Using the confirm command, make sure your user is ready to play. For example, I would use the sentence "I am ready to play!". Add whatever phrase you would like in the confirm.
Stuck? Get a hint! Hint
Get live, fast support from Codecademy Advisors when you get stuck. Learn more.

To get the user to confirm something, the syntax looks like:

confirm("I understand confirm!");