Skip to main content
Module

x/froebel/mod.ts>numberRange

A strictly typed utility library.
Go to Latest
function numberRange
import { numberRange } from "https://deno.land/x/froebel@v0.21.3/mod.ts";

Constructs a numeric between start and end inclusively.

Examples

Example 1

range(2, 6)      // -> [2, 3, 4, 5, 6]
range(8, 9, .3)  // -> [8, 8.3, 8.6, 8.9]
range(3, -2)     // -> [3, 2, 1, 0, -1, -2]

Parameters

start: number
  • The step between items of the list. Must be > 0 for ascending and < 0 for descending ranges. Defaults to 1 if ascending and -1 if descending.
end: number
optional
step = [UNSUPPORTED]

Returns

number[]