mrmikemcguire / Blackjack

1 stars 6 forks source link

unshift() #4

Open mrmikemcguire opened 8 years ago

mrmikemcguire commented 8 years ago

@gabesullice In the dealer.js file, you have these lines:

Dealer.prototype = {
    deal: function (player, deck, table)
        {
        card = deck.unshift();
        player.hand.push(card);
        table.addCard(card, player);

        return this;
        }

Without an argument, won't unshift() just return the length of the array?

gabesullice commented 8 years ago

Solved by #3, and #5