Object Oriented JavaScript shared method variables
<p>Why doesn't this work?</p>

<pre><code>function thing() {

    var bigvar;

    function method1() {
        bigvar = 1;
    }

    function method2() {
        alert(bigvar);
    }

    this.method1 = method1;
}

var a = new thing();
a.method1();
a.method2();
​
</code></pre>

<p>I want method2 to work, but it doesn't .. is there a way to make this work?</p>
