📅  最后修改于: 2022-03-11 15:04:19.710000             🧑  作者: Mango
// how to generate random words from an array
const Coins = ["Heads","Tails"]
let Generate = Math.floor((Math.random() * Coins.length));
console.log(Coins[Generate]) // this will print the outcome