When there are two arrays arr1, arr2 and assigning one array to another making one array null doesn't affect other? Any Specific reason??Array assignment in JavaScript. consider the below example..
var arr1 = [1,2,3,4,5,6,7,8,9,0];
var arr2 = arr1;
arr1[2]=10;
console.log(arr1);//[1, 2, 10, 4, 5, 6, 7, 8, 9, 0]
console.log(arr2);//[1, 2, 10, 4, 5, 6, 7, 8, 9, 0]
arr1 = [];
console.log(arr1);//[]
console.log(arr2);//[1, 2, 10, 4, 5, 6, 7, 8, 9, 0]