I can't copy the array
Arrays are objects, unlike the primitive types like string, int, etc ... variables that take objects correspond to references (pointer) for objects, rather than the object itself, so different variables can reference the same object. Variable of primitive type (string, int, etc.) are associated to values.
In your case you will have to clone your object array for have the same values.
var Mycollection = new Array("James", "John", "Mary");
var Mycollection2 = Mycollection.slice();
JavaScript passes the array by reference, to have separate arrays do:
var Mycollection = new Array("James", "John", "Mary");
var Mycollection2 = Mycollection.slice();
You are actually copying a reference in your code,
var Mycollection = new Array("James", "John", "Mary");
var Mycollection2 = Mycollection; // Makes both Mycollection2 and Mycollection refer to the same array.
Use the Array.slice() method which creates a copy of part/all of the array.
var Mycollection1 = new Array("James", "John", "Mary");
var Mycollection2 = Mycollection.slice();
Mycollection1.pop();
console.log(Mycollection1.toString()) // ["James", "John"]
console.log(Mycollection2.toString()) // ["James", "John", "Mary"]