MUSA 611, Week 2

Review

You can review the concepts raised in the Codecademy exercises in review.md.

Assignment

Code Academy

NOTE: All materials in this course are free by design. Any 'pro' sections in code academy are not assigned

Exercise

Tools

  • A GitHub account
  • A git client (e.g., the git CLI, or GitHub Desktop)
  • A code editor with syntax highlighting, such as Atom, VS Code, or Sublime.
  • A browser with a JavaScript console

Exercises

Part 1

  1. Fork this repository to your own GitHub account, and clone it to your computer.
  2. Open the file exercise/part1-types-variables-math/index.html in your browser.
  3. Open your JavaScript console (Chrome, Edge, Firefox, Opera, Safari). You should see output such as:
    Task 1 failure!
    Task 2 failure!
    Task 3 failure!
    Task 4 failure!
    Task 5 failure!
    
  4. Open the file exercise/part1-types-variables-math/index.js in your code editor of choice.
  5. Follow the instructions in the file.

Part 2

  1. Open the file exercise/part2-abstracting-with-functions/index.html in your browser.
  2. Open the file exercise/part2-abstracting-with-functions/index.js in your code editor of choice.
  3. Follow the instructions in the file. Remember to commit your code often as you go.

Submitting your code

When you submit your pull request, your code will be linted and tested automatically. If all of the tests pass you will see green check marks on the pull request. If any of the tests fail, you should see red X's. You can see what tests fail by clicking on the failed tasks and reading the logs. Edit your copy of the code until all the tests show green checks (you do not have to re-submit a new PR to get the tests to re-run; as soon as you change your code on GitHub the tests will run).

NOTE: You can run the tests on your computer before submitting a pull request, or even before committing your code. You will have to install Node.js version 16 or later first. After you do, you can run the following in your terminal, working from the week folder:

# Install test dependencies (this only has to be done once)
npm install

# Run the linter
npx eslint exercise

# Run the tests
npx jest