0

Trying to figure out how to grab a random array then set interval by 1 seconds

Const myArray = ['January', 'February', 'March']; https://code.sololearn.com/WZ80NlPYzDse/?ref=app

16th Oct 2019, 10:13 PM
Ade Bakari
Ade Bakari - avatar
8 Réponses
+ 3
Yes question is clear but where did you try? Show us your code.
16th Oct 2019, 11:03 PM
A͢J
A͢J - avatar
+ 2
Please first Try to do by yourself. People are not here to write your program. We are also learning here.
16th Oct 2019, 10:14 PM
A͢J
A͢J - avatar
+ 2
Check this. Here setInterval function is given. You can take help of this. https://www.w3schools.com/jsref/met_win_setinterval.asp
16th Oct 2019, 11:24 PM
A͢J
A͢J - avatar
+ 2
If you freeze the value, there is no random each interval https://code.sololearn.com/Wtlv6Dgr5i6l/?ref=app You need to random each time the function is called, like this : https://code.sololearn.com/W4CPu89KAWm3/?ref=app
16th Oct 2019, 11:54 PM
Gordon
Gordon - avatar
+ 1
Then what problem you are facing? Share that.
16th Oct 2019, 10:16 PM
A͢J
A͢J - avatar
0
I did
16th Oct 2019, 10:14 PM
Ade Bakari
Ade Bakari - avatar
0
I corrected the question. Is that clear
16th Oct 2019, 10:18 PM
Ade Bakari
Ade Bakari - avatar
0
I put it in there, I got the random array part. Trying to figure out how to setInterval function by 1 second
16th Oct 2019, 11:18 PM
Ade Bakari
Ade Bakari - avatar