Why doesn't this work?
function thing() {
var bigvar;
function method1() {
bigvar = 1;
}
function method2() {
alert(bigvar);
}
this.method1 = method1;
}
var a = new thing();
a.method1();
a.method2();
I want method2 to work, but it doesn't .. is there a way to make this work?