Easy Question Of Leetcode Javascript