How do you get a random item from a random list? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

How do you get a random item from a random list?

In simplest form, I'm trying to create a random movie selector with two buttons. First button is for a random movie flavor, ex: Love, War, True. (I have this working). And the second button to pick a movie from that first random answer, from that movie flavor array, or list.

17th Feb 2020, 8:29 PM
KiM CARLeY
3 Answers
0
First you choose in an array and the result is another array, where you choose again.
17th Feb 2020, 10:25 PM
JaScript
JaScript - avatar
0
I have that now ... My first button gets the random "movie flavor". It's getting the second button to get a movie from that array. It's writing the correct function to do that. Some how I make my target, the movie from the list or array that the first button picks. The answer from first button has to be part of the equation. I'm just not experienced enough to figure it out. Thanks anyhow ... ^ _ ^ ...
20th Feb 2020, 6:49 PM
KiM CARLeY
0
Unfortunately we are not clairvoyant and need a code to judge.
20th Feb 2020, 8:35 PM
JaScript
JaScript - avatar