Leetcode Plus One Solution Javascript Interview Question