Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- let array1 = [1,2,3];
- let array2 = array1;
- console.log(array2); //[ 1, 2, 3 ]
- array2.push(4,5,6);
- console.log(array2); //[ 1, 2, 3, 4, 5, 6 ]
- console.log(array1); //[ 1, 2, 3, 4, 5, 6 ]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement