Assignment 2 from my JavaScript college course.