I thought that when using the slice() method, we were just making a shallow copy, meaning that if I modify any value of the copy that is referenced, it will be reflected on the original too.
Example:
const arr = [
{ name: "John", lastName: "Doe" },
{ name: "Chris", lastName: "Dior" },
];
const arrCopy = arr.slice(); // Creating shallow copy
arrCopy[0].name = "Stella"; // Changed in copy AND original as it should
arrCopy.pop(); // Deleting last element of the copy, ONLY disappears in the copy
console.log(arr); // has both elements
console.log(arrCopy); // has only one
Why does the second object is gone just in the shallow copy? I thought the arr and arrCopy were pointing to the same object. (an array with objects)
Thanks in advance, Im really new to programming in general and this topic is getting confusing sometimes.

arrCopy.pop()you remove the last value (i.e. reference to an object) from arrCopy. Also, when you doarrCopy[0].name = "Stella"you are changing the object referenced by both arrays, you aren't actually changing the array per se. :-)