How to generate random numbers without repetition in javascript
After reading this article, you will able to generate random numbers without repetition using JavaScript.
Suppose, you want to create a quiz app where the questions will display randomly. But, there is a problem. Whenever, the quiz displays the questions and answers randomly, one question can display multiple times. So, we need to remove the duplicate questions and display the unique questions.
Generate random number without repetition
Try it Yourself »
In the above example, first of all, I have created a button with a function named generateRandomQuestion. Whenever, someone clicks on that button the function generateRandomQuestion will execute.
save
listen
AI Answer
How to generate random numbers without repetition in javascript
0
After reading this article, you will able to generate random numbers without repetition u…
asked
Apu
0 answers
2915
After reading this article, you will able to generate random numbers without repetition u…
Answer Link
answered
Apu