Javascript class and challenges