Roman To Integer Leetcode Solution Javascript