AllStarCodeOrg / week0.day2.conditionals

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

week0.day2.conditionals

Instructions

  1. Create a Repo on GitHub named "conditionals" - GitHub Lecture (see slide 22+)

    • Remember to initialize it with a README.md
  2. 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
  3. 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
  4. Test your code frequently by running the command node conditionals.js

  5. Remember to add, commit, and push your changes!

  6. Look over this worksheet to help fill in any gaps. We’ll be reviewing these on Monday!

Extra Credit

  • 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.

Helpful Resources

About


Languages

Language:JavaScript 100.0%