Introduction

In this lab you'll solidify your understanding of JS and the DOM by building a fun and interactive web game using only JS and the DOM API. This is a pretty lengthy assignment, but it is split between a lab portion and a homework portion.

Try and complete as much as you can today in lab, but the finished assignment will be do next Thursday, February 28. There will be a checkoff after section 2.3. Try and submit before you leave regardless of whether you finish or not. It is checked for completion.


Checkoff Submission

Due: 11:59PM, February 19

Lab 2 - Lab 2 Submission

HW 2 Submission

Due: 11:59PM, February 28

HW 2 - HW 2 Submission


Learning Goals:

by the end of this lab you should

Task 1 - Python ⇒ JS

To catch you up to speed on JS syntax, we've written a guide for going from Python to JS.

Python ⇒ JS

Once you've read it, please discuss the questions below with a partner. Try not looking at the answers until you've decided on an answer!

  1. What is the difference between let and const?
  2. Pick the correct way to compare "0" and 0, such that it returns false (they're not the same)
    1. "0" == 0
    2. "0" === 0
    3. "0".isEqual(0);
  3. How do we iterate through items in an array in JS?
  4. What is the difference between undefined and null?