export function randomArrayElement < T > ( array ) { return array [ randomInt ( array . length - 1 ) ] ; } export function randomInt ( max ) { return Math . floor ( Math . random ( ) * ( max + 1 ) ) ; }