This is a working example of the exercise.
You can download starter html and javascript here and here, respectively.