mirror of
https://github.com/CorentinTh/it-tools.git
synced 2025-04-22 15:56:15 -04:00
9 lines
244 B
TypeScript
9 lines
244 B
TypeScript
![]() |
const randFromArray = (array: any[]) => array[Math.floor(Math.random() * array.length)]
|
||
|
|
||
|
const randIntFromInterval = (min: number, max: number) => Math.floor(Math.random() * (max - min) + min)
|
||
|
|
||
|
export {
|
||
|
randFromArray,
|
||
|
randIntFromInterval
|
||
|
}
|