pnp-scheduler/source/Utilities/ArrayUtils.ts
2025-03-29 20:15:50 +01:00

6 lines
No EOL
181 B
TypeScript

export class ArrayUtils {
public static chooseRandom<T>(array: Array<T>):T {
const index = Math.floor(Math.random() * array.length);
return array[index];
}
}