How to write random?

Hi all. How do I do this with Rand, to deliver to every specific value of a random phrase. Here's an example:

Fruit: banana
The color of the fruit: red
Growing fruit: Russia


And to answers was timer:

Fruit: "the answer is formed, wait for 15 seconds"
The color of the fruit: "the answer is formed, wait for 20 seconds"
Where it grows fruit, "the answer is generated, wait 25 seconds"

Can I do normal random numbers, but this random I can't do it, who is a Pro in this matter, help me. Thank you in advance.
March 19th 20 at 09:18
1 answer
March 19th 20 at 09:20
Solution
let phrases = ['banana', 'Apple', 'orange', 'kiwi'];
phrases[Math.floor(Math.random() * phrases.length)]; // a random element

next, I think, everything is clear
I'm a newbie, sorry, I did not realize that you need to write more.. :( - nathanael93 commented on March 19th 20 at 09:23
@nathanael93, example - Aiyana.Klein commented on March 19th 20 at 09:26
@Aiyana.Klein, thank you very much! You helped me a lot!!!!))) - nathanael93 commented on March 19th 20 at 09:29

Find more questions by tags HTMLJavaScript