tracks

Codecademy

Sign in Sign up
Ajax-loader-large-white
1/7
Choose Your Own Adventure!
Confirm

You have some programming skills. Time to make something you can show people! We're going to show you how to program a 'choose 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!

Instructions
  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

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

confirm("I understand confirm!");
script.js
Back to Editor

Sign in