Function log

Calculate the natural logarithm (base e) of each element in an array.

> log([1, Math.E, Math.E * Math.E])
[0, 1, 2]
  • Parameters

    • array: number[]

      The array of numbers.

    Returns number[]

    An array with the natural logarithm of each input element.