Skip to content

Instantly share code, notes, and snippets.

@TiagoFuelber
Last active June 17, 2021 13:44
Show Gist options
  • Save TiagoFuelber/4fe3c716f10554e210682d5d3aa013a8 to your computer and use it in GitHub Desktop.
Save TiagoFuelber/4fe3c716f10554e210682d5d3aa013a8 to your computer and use it in GitHub Desktop.
const options = [
"quarterpipe",
"big hubba",
"small hubba",
"flatrail",
"vault",
"vault gap",
"stairs",
"ledge",
"manual pad",
"manual pad gap",
"handrail",
"pole",
"ledge with ramp",
"45 / pyramid",
"trunk"
]
const sort = (options) => {
const index = Math.round(Math.random() * options.length);
return options[index];
}
console.log(sort(options));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment