Function numRange

  • Generates an array of numbers within a specified range.

    Parameters

    • start: number

      The start of the range.

    • end: number

      The end of the range.

    Returns number[]

    An array of numbers from start to end, inclusive.

    Throws

    Will throw an error if start is greater than end.

    Example

    numRange(1, 5);
    //=> [1, 2, 3, 4, 5]
    numRange(5, 5);
    //=> [5]

Generated using TypeDoc