Quick Examples:
var arr1 = ['a','b','c'];_x000D_
// arr1 and arr2 are independent and primitive elements are stored in _x000D_
// different places in the memory_x000D_
var arr2 = arr1.slice(); _x000D_
arr2.push('d');_x000D_
console.log(arr1); // [ 'a', 'b', 'c' ]_x000D_
console.log(arr2); // [ 'a', 'b', 'c', 'd' ]
_x000D_
var arr1 = [{ x: 'a', y: 'b'}, [1, 2], [3, 4]];_x000D_
// arr1 and arr2 are independent and reference's/addresses are stored in different_x000D_
// places in the memory. But those reference's/addresses points to some common place_x000D_
// in the memory._x000D_
var arr2 = arr1.slice(); _x000D_
arr2.pop(); // OK - don't affect arr1 bcos only the address in the arr2 is_x000D_
// deleted not the data pointed by that address_x000D_
arr2[0].x = 'z'; // not OK - affect arr1 bcos changes made in the common area _x000D_
// pointed by the addresses in both arr1 and arr2_x000D_
arr2[1][0] = 9; // not OK - same above reason_x000D_
_x000D_
console.log(arr1); // [ { x: 'z', y: 'b' }, [ 9, 2 ], [ 3, 4 ] ]_x000D_
console.log(arr2); // [ { x: 'z', y: 'b' }, [ 9, 2 ] ]
_x000D_
var arr1 = [{ x: 'a', y: 'b'}, [1, 2], [3, 4]];_x000D_
arr2 = JSON.parse(JSON.stringify(arr1));_x000D_
arr2.pop(); // OK - don't affect arr1_x000D_
arr2[0].x = 'z'; // OK - don't affect arr1_x000D_
arr2[1][0] = 9; // OK - don't affect arr1_x000D_
_x000D_
console.log(arr1); // [ { x: 'a', y: 'b' }, [ 1, 2 ], [ 3, 4 ] ]_x000D_
console.log(arr2); // [ { x: 'z', y: 'b' }, [ 9, 2 ] ]
_x000D_