JavaScript Fix the Scope Lab

Objectives

  • Explore scope in JavaScript
  • Exercise bug-finding skills related to scope issues

Instructions

In this lab, you'll need to debug some issues related to function scope in JavaScript: variables might not be what we expect, certain variables might be unavailable, and in general havoc might be set loose in the current code.

As usual, start by running the specs and reading the results. Then fix some things, run the tests again, and repeat.

You're probably pretty good at this right now — good luck!

Resources