As you can see below, even though the array is logged before the mutating method is applied, the debugger still shows it as already being applied. However, its elements and properties when called specifically still return correctly:
If I add a breakpoint before the methods, then it is correct. If I continue then the result doesn't change.
I've read about Copying methods and mutating methods but still don't get why this is the case.
Is this a bug of VS Code or something?
const array = ["cat","dog","mouse"]
console.log('array', array);
console.log('array[0] :>> ', array[0]);
console.log('array.length :>> ', array.length);
array.splice(0, 1)
// array.push('bat')
debugger