npm.nicfv.com

    Function factors

    • Factorize n into its prime factors.

      Parameters

      • n: number

        Any positive integer

      Returns number[]

      The array of prime factors

      const y = SMath.factors(12); // [ 2, 2, 3 ]
      
    MMNEPVFCICPMFPCPTTAAATR