var GetRandom = function (array, startIndex, length){ if (startIndex === undefined) { startIndex = 0; } if (length === undefined) { length = _AN_Read_length('length', array); } var randomIndex = startIndex + Math.floor(Math.random() * length); return (array[randomIndex] === undefined)? null : array[randomIndex]; } ; module.exports = GetRandom;