Am practicing js and while I was searching to make a deck of cards I found these lines of codes but there is one line that I can't understand (I left three emty lines around it to reach it easily)
class Deck {
constructor() {
this.deck = [];
const suits = ['Hearts', 'Spades', 'Clubs', 'Diamonds'];
const values = ['Ace', 2, 3, 4, 5, 6, 7, 8, 9, 10, 'Jack', 'Queen', 'King'];
for (let suit in suits) {
for (let value in values) {
this.deck.push(`${values[value]} of ${suits[suit]}`);
}
}
}
}
const deck1 = new Deck();
console.log(deck1.deck);