problem id 1, javascript completed