Skip to content

Instantly share code, notes, and snippets.

@jamiejohnsonkc
Created March 31, 2021 22:09
Show Gist options
  • Save jamiejohnsonkc/c58e82c911b50e99fe720b48e71cd33e to your computer and use it in GitHub Desktop.
Save jamiejohnsonkc/c58e82c911b50e99fe720b48e71cd33e to your computer and use it in GitHub Desktop.
random string from array #JS_random_string
const movesArray = ['rock', 'paper', 'scissors']
const rand = movesArray[Math.floor(Math.random() * movesArray.length)]
console.log(rand)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment