React Native
React Native
Generating Random Integer in Range
See more PRNG Examples
Demonstrates how to generate random integers in a specified range.Chilkat React Native Downloads
import { Prng } from '@chilkat/react-native'
function chilkatExample() {
// This example assumes the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.
const fortuna = new Prng();
// Generate random integers between 12 and 24 inclusive
for (let i = 0; i <= 100; i++) {
console.log(fortuna.randomInt(12, 24));
}
}