I\'ve written the following JavaScript:
var myArray = [\'a\', \'b\', \'c\']; var copyOfMyArray = myArray; copyOfMyArray.splice(0, 1); alert(myArray); // aler
In JS, operator "=" copy the pointer to the memory area of the array. If you want to copy an array into another you have to use the Clone function.
For integers is different because they are a primitive type.
S.