Ad
function digitizeNumber(number) {
   let digits = [];
   let stringNumber = number && number.toString() || "";
   
   for (let i = 0; i < stringNumber.length; i += 1) {
      digits.push(+stringNumber.charAt(i));
   }
   return digits;
}