Smallest Missing Positive Integer Leetcode Javascript Solution