Working on js exercise code