Assignment 2 for Advanced JavaScript