Function random

  • return a random integer between min (included) and max (excluded)

    Parameters

    • min: number

      minimum value.

    • max: number

      maximum value.

    Returns number

    random value

    // Print a random number; one of 5, 6, 7, 8, 9
    console.log(math.random(5, 10));