You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is in FSD Module 5 ==> In Class ==> Conditional Statements ==> Creating a Choose-Your-Own-Adventure-Game activity
Step 4 in this activity "Respond to the user's answer..." has a bug in it.
Line 7 "if (answer" should be "if (firstAnswer"
It needs to be corrected in both the image and the "copy text"
1 : let firstAnswer = window.prompt('Do you head left or right?')
2 : if(firstAnswer === 'left'){
3 : let secondAnswer = window.prompt(You come across a stray cat. 4 : It scampers off down a small hole, just large enough for you to crawl through. 5 : Do you follow it, or continue on your path?)
6 :
7 : } else if(answer === 'right') { // this line should read "if(firstAnswer === 'right')"
8 : let secondAnswer = window.prompt(You come across a snoring dragon. 9 : On the other side of him, you see a shiny chest of treasure. Another path would 10 : lead you away from the dragon altogether. Which path do you take?)
11 :
12 : }
The text was updated successfully, but these errors were encountered:
Instructor-Stan
changed the title
Bug in code - Step 4; Line 7
FSD Module 5 Activity > In Class > Conditional Statements > Creating a Choose-Your-Own-Adventure Game - Bug in code - Step 4; Line 7
Oct 26, 2021
This is in FSD Module 5 ==> In Class ==> Conditional Statements ==> Creating a Choose-Your-Own-Adventure-Game activity
Step 4 in this activity "Respond to the user's answer..." has a bug in it.
Line 7 "if (answer" should be "if (firstAnswer"
It needs to be corrected in both the image and the "copy text"
1 : let firstAnswer = window.prompt('Do you head left or right?')
2 : if(firstAnswer === 'left'){
3 : let secondAnswer = window.prompt(
You come across a stray cat. 4 : It scampers off down a small hole, just large enough for you to crawl through. 5 : Do you follow it, or continue on your path?
)6 :
7 : } else if(answer === 'right') { // this line should read "if(firstAnswer === 'right')"
8 : let secondAnswer = window.prompt(
You come across a snoring dragon. 9 : On the other side of him, you see a shiny chest of treasure. Another path would 10 : lead you away from the dragon altogether. Which path do you take?
)11 :
12 : }
The text was updated successfully, but these errors were encountered: