0

I need help ! How to output random numbers without repeating in JavaScript?

I need help ! How to output random numbers without repeating in JavaScript?

7th Sep 2017, 5:28 AM
davidthegreat
davidthegreat - avatar
5 Respostas
+ 4
pseudocodeExpl generate randNum append to array print randNum loop if randNum in array don't print
7th Sep 2017, 6:41 AM
Abdur-Rahmaan Janhangeer
Abdur-Rahmaan Janhangeer - avatar
+ 1
num = (Math.floor(Math.random() * n)); // random num from 0 to n-1 https://code.sololearn.com/W7Lm9Ufx4cna/?ref=app
7th Sep 2017, 5:33 AM
Calviղ
Calviղ - avatar
0
no comments...
9th Sep 2017, 8:59 AM
davidthegreat
davidthegreat - avatar
- 1
Math.random
9th Sep 2017, 8:58 AM
David Heldt
David Heldt - avatar