aakims / musa-611-spring-2022-week3

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

MUSA 611, Week 3

Review

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

Attributions

Assignment

Reading

The chapter on JavaScript Interactivity from Introduction to Web Mapping.

Exercises

Like all previous exercises, this one will be submitted via pull request, and will have automated tests run against it.

  1. Fork this repository to your own GitHub account, and clone it to your computer.
  2. Run npm install if you want to run the tests and linter locally (optional, but highly recommended).

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 and debugger

Part 1-4

  1. Open the HTML file from the corresponding folder in your browser.
  2. Open your JavaScript console to see the output from the tasks.
  3. Open the exercise's .js file in your code editor of choice.
  4. Follow the instructions in the file.

Part 5: Mapping Schools

For this part of the exercise, you will:

  • Use the data in the data/phl_school_facilities.js file
  • Use the debugger in your browser to set a breakpoint to inspect some code's behavior; refer to breakpoints.md for a visual guide to setting a breakpoint
  • Filter data and add it to a map

Follow the same process as with all other exercises so far (i.e., instructions are in the part5-mapping-schools/index.js file).

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 web server; this is needed for the tests
npx http-server --port 8000

# Open a new terminal and run the tests
npx jest

About


Languages

Language:JavaScript 98.7%Language:HTML 1.1%Language:Python 0.2%Language:CSS 0.1%