@oaishmauthorSep 20.2011 — #Yes, I can see how this works in the trivial case. How if I want to traverse a tree
Something like [CODE]var x={} for (i=1;i<100;i++){ var g=g||x; g[i]={}; g=&g[i]; // by reference to get one level down this is what I really want
} [/CODE]
so by the end we'd have x={1:{2:{3:{4: etc.
So we can traverse wtih [CODE] var p = function (n){ r = n||x; if(functiontotestifobject(r)){ for(var i in r){ var z = p(r[i]); //I don't know, something like this, obviously I concocted this } else { return something} } [/CODE]
@Jeff_MottSep 20.2011 — #Yes, I can see how this works in the trivial case. How if I want to traverse a tree
Something like [CODE]var x={} for (i=1;i<100;i++){ var g=g||x; g[i]={}; g=[color=red]&[/color]g[i]; // by reference to get one level down this is what I really want
} [/CODE]
so by the end we'd have x={1:{2:{3:{4: etc.[/QUOTE]