solved javascript