Need to deal the last card in a deck? Array’s pop method removes and returns the array’s last element. To use it with a Set-based deck, convert the Set to an array first. section 26.1
Listing 26.7. src/cards.js
The pop function spreads the deck into an array, takes its last card, marks it face up, removes it from the Set, and returns it. section 26.1



