This is an activity for SD Lesson 1.10.2- Conditional Statements.
Please refer to the Activity Guide in Canvas for directions.
License: MIT License
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 : }
This activity shows how to edit and add to the index.js file, but makes no reference to index.html.
The students get confused when they try to open index.js in their browser and the JavaScript code is displayed.
Please add a step in the instructions either above or just after step 1
### Telling the students to open index.html in their browser.
Activity on Canvas has students perform npm install, but there is no longer a package.json so it throws an error. The canvas activity instructions may need updating to remove that line of instruction.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.