Easy
Understanding Array Reassignment vs Push Method in JavaScript
What will this code output?
1let arr = [1, 2, 3];2arr.push(4);3arr = [5, 6, 7];4console.log(arr);
What will this code output?
1let arr = [1, 2, 3];2arr.push(4);3arr = [5, 6, 7];4console.log(arr);