const names = ['david', 'gary', 'shaun', 'stephen']; function getRandomIndex(array){ const index = Math.floor(Math.random() * array.length); let randomNumber = array[index]; return randomNumber; } getRandomIndex(names)
const names = ['david', 'gary', 'shaun', 'stephen']; function getRandomIndex(array){ const index = Math.floor(Math.random() * array.length); let randomNumber = array[index]; return randomNumber; } getRandomIndex(names)