'use strict'; const crypto = require('crypto'); function pickRandom(array) { if (array.length === 0) { return null; } return array[crypto.randomInt(0, array.length)]; } module.exports = pickRandom;