another solution that doesn't require translating the integer to a String would be to get the number, divide it by 10, get the digit and repeat the process. _Originally posted by @ignacio-chiazzo in https://github.com/ignacio-chiazzo/Algorithms-Leetcode-Javascript/pull/57#discussion_r989569795_