title: Blackjack Javascript: Trying to add all the cards into the deck (did I do this correctly?)
body: <p>So I'm creating a Blackjack game via Javascript and what I'm trying to do is set up all the cards and add it to the deck. When I tried this and checked in the console, it did not work and I can't seem to find what I did wrong. Am I on the right track here? I'll post what I have. I'm just getting started. Any help would be appreciated. Thanks.</p>
  
  <pre><code>var card = function(value, name, suit) {
    this.value = value;
    this.name = name;
    this.suit = suit;
  }
  
  var deck = function() {
    this.names = ['2', '3', '4', '5', '6', '7', '8', '9', '10', 'J', 'Q', 'K', 'A'];
    this.suits = ['Hearts', 'Diamonds', 'Spades', 'Clubs'];
    this.values = [2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 11];
    var cards = [];
    for (var s = 0; s &lt; this.suits.length; s++) {
      for (var n = 0; n &lt; this.name.length; n++) {
        cards.push((this.values[n], this.names[n], this.suits[s]));
      }
    }
    return cards;
  }
  </code></pre>