-
Create a Repo on GitHub named "conditionals" - GitHub Lecture (see slide 22+)
- Remember to initialize it with a README.md
-
In command line, navigate to your “Documents” Folder:
- Clone the repo to your computer using
git clone {url}
- Remember, the url for the repo is found in the green “Clone or Download” button4. Follow the instructions in the comments
- Clone the repo to your computer using
-
Navigate into the newly cloned repo and create a file called “conditionals.js”
- Copy (
Ctrl+C
) and paste (Ctrl+V
) this code into the file
- Copy (
-
Test your code frequently by running the command
node conditionals.js
-
Remember to add, commit, and push your changes!
-
Look over this worksheet to help fill in any gaps. We’ll be reviewing these on Monday!
- NOTE: this is NOT homework. From the past two years, students have REQUESTED worksheets, so I have provided them. Use them at your discretion!
- Worksheet: Conditionals
- Clear and readable code is a sign of an experienced programmer. Clean up your code using this JavaScript “beautifier”
- Observe the differences between what you originally made and what the same code looks like “beautified”. From now on, try to write readable code the first time around.
- Add your own conditional story endings to the code. Have some of your fellow All Stars play test your changes.