Skip to main content
Deno 2 is finally here 🎉️
Learn more
Latest
method RandomUtil.prototype.randInt
import { RandomUtil } from "https://deno.land/x/sptaki@1.2.0/utils/mod.ts";

Draw Random integer low inclusive, high exclusive if high is not set we draw from 0 to low (exclusive)

Parameters

low: number

Lower bound inclusive, when high is not set, this is high

optional
high: number

Higher bound exclusive

Returns

number

The random integer in [low, high)