discord js pick random from array

Solutions on MaxInterview for discord js pick random from array by the best coders in the world

showing results for - "discord js pick random from array"
Antonio
13 Mar 2019
1var answers = [
2  "Hey",
3  "Howdy",
4  "Hello There",
5  "Wotcha",
6  "Alright gov'nor"
7]
8
9var randomAnswer = answers[Math.floor(Math.random() * answers.length)];
10
11console.log(randomAnswer);