passing parameters to nested functions
<p>This is my code:</p>

<pre><code>var Placemat = function(id,id2) {
    this.hand = document.getElementById(id);
    this.bucket = "";
    this.bucketspace = document.getElementById(id2);
    this.bucketvalue = 0;
    var that = this;
    this.deal = function(id) {
        shuffle();
        var card1 = deck.shift();
        var card2 = deck.shift();
        this.hand.innerHTML = card1 + ", " + card2;
    };
    this.hit = function(id2) {
        var card3 = deck.shift();
        this.bucket = this.bucket + deck.shift();
        this.bucketspace.innerHTML = this.bucket; 
    };
};
</code></pre>

<p>Is this the proper way to pass parameters to a nested function? This <code>id</code> and <code>id2</code> in <code>this.deal()</code> and <code>this.hit()</code> are from <code>Placemat()</code>.</p>
