• Produces a random number between min and max (inclusive). If only one argument is provided a number between 0 and the given number is returned. If floating is true, or either min or max are floats, a floating-point number is returned instead of an integer.

    Parameters

    • Optionalfloating: boolean

      Specify returning a floating-point number.

    Returns number

    Returns the random number.

  • Parameters

    • max: number
    • Optionalfloating: boolean

    Returns number

    _.random

  • Parameters

    • min: number
    • max: number
    • Optionalfloating: boolean

    Returns number

    _.random

  • Parameters

    • min: number
    • index: string | number
    • guard: object

    Returns number

    _.random