dimanche 26 juillet 2020

I need to shuffle/randomize a string that was created by a join method, but returns a random array instead [closed]

Function I used to join the array elements and randomize the joined string.

function passwordJoin() { 
   let finalPassword = final.join('');
   console.log(finalPassword); 

Randomize the String (Returning the array randomized) let random = final.sort(() => Math.random() - 0.5); console.log(random); }




Aucun commentaire:

Enregistrer un commentaire