Skip to main content
Module

x/aitertools/mod.ts>Range#[Symbol.iterator]

Well-tested utility functions dealing with async iterables
Go to Latest
method Range.prototype.[Symbol.iterator]
import { Range } from "https://deno.land/x/aitertools@0.5.0/mod.ts";

Iterates over the elements of the range.

import { range } from "./range.ts";

for (const value of range(4n)) console.log(value);

The above example will print the following 4 lines:

0
1
2
3

Returns

Iterator<T>

An iterator that iterates over the elements of the range.