Let's say I've created an array arr
through the console.
let a = [1,2,3,4,3,5]
Following will auto evaluate and show the result
a.slice()
Following will only evaluate when you invoke it. (Press Enter)
a.splice()
So, how does the console know that splice
will cause mutation and slice
will not.
Is there some kind of list of names of mutation causing functions under the hood?