Barajando tu mazo
Aquí está mi código
function shuffle (deck) { let shuffleDeck = deck; let currentIndex = deck.length; let temporaryValue, randomIndex; while (currentIndex != 0) { randomIndex = Math.floor(Math.random() * currentIndex); currentIndex -= 1; temporaryValue = shuffleDeck[currentIndex]; shuffleDeck[randomIndex] = temporaryValue; } return shuffleDeck; }Soy súper nuevo en la codificación, así que estoy confundido