Generates a random integer between min and max. Both min and max are inclusive.
random(1, 10); // => 5
npx atmx add helper random
Copy and paste the following method into @/utils/helpers/undefined.ts:
@/utils/helpers/undefined.ts
/*** Generates a random integer between min and max. Both min and max* are inclusive.** @example* random(1, 10) // => 5*/export function random(min: number, max: number): number {return Math.floor(Math.random() * (max - min + 1) + min);}