Completed code for ud804 course on Udacity - javascript basics