function* generatePoker() {
const points = ['A', 2, 3, 4, 5, 6, 7, 8, 9, 10, 'J', 'Q', 'K']; yield* points.map(p => ['♠️', p]);
yield* points.map(p => ['♣️', p]);
yield* points.map(p => ['♥️', p]);
yield* points.map(p => ['♦️', p]);
}
const cards = generatePoker(); function* shuffle(cards) {
cards = [...cards];
console.log(cards)
}
shuffle(cards).next()

  

05-12 19:15