const digitize = (n: number) => [...`${Math.abs(n)}`].map(i => parseInt(i));
      
      Typescript language logo

      Number to digits

      Codiga's TypeScript Recipes

      Converts a number to an array of digits, removing its sign if necessary.

      0 Comments

        Add Comment

        Log in to add a comment

        Codiga - All rights reserved 2022.