problem 4 javascript