I'm trying to replace the value of item with values in the array arr, but I only get that if I use: arr [1], arr [2] ... if I just let
arr, returns abcdefg.
I am PHP programmer, and I have a minimal notion with JavaScript, can someone give me a light?
var item = 'abcdefg';
var arr = new Array();
arr[1] = "zzz";
arr[2] = "abc";
var test = item.split(arr);
alert(test.join("\n"));
itemshould contain when this has completed. Shoulditemlook likezzzabcorzzzdefgor something else entirely?