Code Fellows class assignment in Javascript