I'm having trouble with the following code:
js code:
// x[0] is a string
// y is an array (that in these circumstances does NOT contain x[0]
if(strip(x[0]) in y){ //strip just removes non-alphanumeric characters
var foo = bar.replace(x[0], y[x[0]]);
Debug.Trace(x[0] + " - " + y[x[0]]);
}
If x[0] is set to "push", "join", "reverse", "pop" or any other array method then I get "Object Expected" error and it traces:
quote:
pop -
function pop() {
[native code]
}
Any ideas why? Everything should just be treated as a string
I'm probably being stupid