New course! Every coder should learn Generative AI!
Try a free lesson- 1
var arr1=[7,8,9]; var arr2=arr1; arr2[0]=8; document.write(arr1[0]);
What happens here?
1 Answer
+ 1
By arr2 = arr2, both variables points to same list so arr1[0] will changed to 8 by arr2[0]=8.