JavaScript - Randomize Items In An Array

preview_player
Показать описание
Learn how to randomize the positions of items in an array in order to shuffle a 52 card deck.

My Gear:

#howtocode #javascript #codingtutorial
Рекомендации по теме
Комментарии
Автор

bro, this is the best explanation ever! I was following a javascript course that mentioned this function but I got really lost. I looked up a couple of videos but explanations were ambiguous! You just hit the point with in a simple and understandable way! God job!

sebastianlozano
Автор

Oh my god, thank you SO much!! I’m new to even playing cards (weird I know), and all the coding questions involving shuffling made me want to sob. THANK you so much for being so crystal clear whilst explaining

mahalaxmii
Автор

Great way to demonstrate shuffle/random concepts! Well done.

laurenhirt
Автор

thank you very much, I've been looking for a while for a function to shuffle something, and you explained it very well, I'm using it for a different purpose, but I was able to learn from this video and make the function work right

Joefry.
Автор

I want to code this, but all I can think about is Vegas and the Mirage.

daveidell
Автор

Is it a necessary to put first declarations inside the function? Or it’s just preference?

aizhanabdrayimova
Автор

hey man would be available for some questions please

rasdinho
Автор

This will not work, because you are putting cards inside the selectable range which allows them for being selected multiple times.
The proper way is to work with 2 decks, randomly pick cards from one and build another.

baronbokaj
Автор

This is WRONG algorithm. This will not give you equally distributed cards.

MrZyman
welcome to shbcf.ru