mardi 3 décembre 2019

How to get random all element of a array JavaScript [duplicate]

This question already has an answer here:

This get a element randon array

var rand = myArray[Math.floor(Math.random() * myArray.length)];

I need a result [1 ,2, 3, 4, 5, 6] to [ 6, 2, 1, 5, 4, 3 ]




Aucun commentaire:

Enregistrer un commentaire