Workshop › Blackjack › Step 2 of 22
A deck has one card of every rank in every suit: 4 × 13 = 52. Two loops, one inside the other, make them all.
```js
let deck
function newDeck() {
deck = []
for (const suit of SUITS) for (const rank of RANKS) deck.push(card(rank, suit))
}
newDeck()
```deck = [] starts empty, so calling newDeck again gives a fresh deck, not a double one.SUITS, write let deck (with an empty line before and after it).card, write newDeck.newDeck() above draw().Skills: Arrays and objects, Loops