Why is this code returning NaN?
<p>blackjack game: I made the deal function below that's supposed to return a random number between 1-4 which represents a suit, as well as another random number between 1-3 which represents a card number. </p>

<p>when I test the code by calling <code>console.log(getSuit(card1));</code> it returns NaN</p>

<p>Anyone know why? </p>

<pre><code>// Make your card constructor again here, but make sure to use private
// variables!
function Card(num, suit){
    var num = num; 
    var suit = suit;
    getSuit = function(){
        return suit; 
    }; 
    getNumber = function(){
        return num; 
    };

    getValue = function(card){
        if (card &gt; 10){
            return 10; 
        }else if (card === 1){
            return 11; 
        }else{
            return card; 
        }

    };

}

// Make a deal function here.  It should return a new card with a suit
// that is a random number from 1 to 4, and a number that is a random
// number between 1 and 13

var deal = function(){
    var suit = Math.floor(Math.random * 4 + 1);
    var number = Math.floor(Math.random * 13 + 1);
    return new Card(number, suit); 
}; 


// examples of the deal function in action
var card1 = deal();
var card2 = deal();

console.log(getSuit(card1));
</code></pre>
