tested in: http://codecombat.com/play/level/quicksort-the-spiral
possible related with: https://github.com/codecombat/aether/issues/48 ?
Symptoms: after changing an element to 17, inspecting element 17 returns correctly 17, but the array print (this.debug) prints -1
you can copy and paste this code in to the mentioned code combat level.
var tree = [];
for(var i=0; i < 49; i++)
tree[i] = -1;
tree[49] = 49;
tree[50] = 50;
this.testFunction = function(tree)
{
tree[17] = 17;
this.debug("Tree entry 17 = "+tree[17],tree);
};
this.testFunction(tree);
for(i=0;i<51; i++)
this.debug(“array[”+i+"] = "+ tree[i]);