¡Nuevo curso! ¡Todo programador debería aprender IA Generativa!
Prueba una lección gratuita- 1
var arr1=[7,8,9]; var arr2=arr1; arr2[0]=8; document.write(arr1[0]);
What happens here?
1 Respuesta
+ 1
By arr2 = arr2, both variables points to same list so arr1[0] will changed to 8 by arr2[0]=8.