how to get a random statement from an array in javascript

JavaScript
//get random value from array
var colors = ["red","blue","green","yellow"];
var randColor = colors[Math.floor(Math.random() * colors.length)];
// 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// List your array items
let Testing1 = ["put","things","here"]
let Generate = Math.floor((Math.random() * Testing1.length)); // Generates a number of the array.

// logs the result
console.log(Testing1[Generate])
Source

Also in JavaScript: