ts-playground
    Preparing search index...

    Function product

    • Product of all values in the array If the array is empty, it returns 1 (1 is identity element for multiplication)

      Parameters

      • values: number[]

      Returns number

      product of all values

      import { product } from '@kitsuyui/mymath'
      product([1, 2, 3, 4]) // => 24