Print N Bit Binary Numbers Leetcode Javascript