Check out this code snippet I have:
var cobj = {
a: 0,
b: 0,
c: 0,
asdinit: function(x, y, w, h) {
this.a = x;
this.b = y;
this.c = w;
this.h = h;
},
adsfads: function(a, b, c, d) {
this.a = a;
this.b = b;
this.c = c;
}
}
var c = new cobj.asdinit(1, 1, 1, 1);
var bigarray = []
for (t = 0; t < 10; t++) {
var newobj = new cobj.asdinit(1, 1, 1, 1);
bigarray.push(newobj);
}
for (t = 0; t < 10; t++) {
var localobj = bigarray[t];
localobj.adsfads(1, 1, 1, 1);
}
Upon object creation, all functions are accessible. However, after being retrieved from the array, the functions seem to be no longer available. Why is that?