Skip to content

Instantly share code, notes, and snippets.

@wedburst
Created October 23, 2020 18:18
Show Gist options
  • Select an option

  • Save wedburst/4504605ab5e05487d0f443d4a70b43cb to your computer and use it in GitHub Desktop.

Select an option

Save wedburst/4504605ab5e05487d0f443d4a70b43cb to your computer and use it in GitHub Desktop.
function whosPaying(names) {
var names = ["Angela", "Ben", "Jenny", "Michael", "Chloe", "Jhon"];
var randomItem = names[Math.floor(Math.random() * names.length)];
return randomItem
}
var pay = whosPaying();
console.log("Te toca pagar " + pay);
document.body.innerHTML = pay;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment