Function abs

  • Compute the absolute value of a number.

    Parameters

    • x: number

      The number.

    Returns number

    Returns the absolute value of of x.

    Since

    0.5.0

    Example

    abs(-2)
    // => 2