Leetcode First Missing Integer Leetcode Javascript Question