Created
March 23, 2018 08:29
-
-
Save AurelieBayre/db91d3e610d1b3c5f635923911531f20 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const getRandomNum = max => Math.floor(Math.random() * Math.floor(max)) | |
const chooseSomeone = (array, role) => { | |
const index = getRandomNum(array.length) | |
return `${array[index]} is the ${role}` | |
} | |
console.log(chooseSomeone(["Aurelie", "Max", "Thibaut", "Arnaud"], "ScrumMaster")) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment