Javascript - Randomizing an Array

preview_player
Показать описание

Randomizing the array using random swapping (also called Fisher–Yates shuffling ) : 1:59

Randomizing the array using sort() function : 4:02
Рекомендации по теме
Комментарии
Автор

Thank you for this. It somehow helped me out.

rabbonettetv
Автор

thank you so much, it's awesome, I used your method to randomly assign questions to my students, it works greatly! 👍👍👍I added some CSS and it's very nice, very elegant code of JavaScript 👏👏👏

oldguitarist-pl
Автор

why are there no duplicates with the first method?

Fredgast
Автор

thank you. But in my array have a problem, when i shuffle it , then i get several duplicate element.

xasayquliyev
Автор

bro how to get string value from user in your program and make it randomize

guru