Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/ayonli_jsext/number/index.ts>range

A JavaScript extension package for building strong and modern applications.
Latest
function range
import { range } from "https://deno.land/x/ayonli_jsext@v0.9.72/number/index.ts";

Generates a sequence of numbers from min to max (inclusive).

Examples

Example 1

import { range } from "@ayonli/jsext/number";

for (const i of range(1, 5)) {
    console.log(i);
}
// output:
// 1
// 2
// 3
// 4
// 5

Parameters

min: number
max: number
optional
step = [UNSUPPORTED]

Returns

Generator<number, void, unknown>