Count Good Numbers Leetcode Problems Javascript Map