I can't seem to get why 'lizard' is being logged in the code below. Can someone explain the difference for me please, thanks in advance
function myFunction(y1,y2, ...y3){
const [x1,...[result]]=y3
console.log(result)
}
const myArray=['rock','paper','scissors','lizards','spock']
myFunction(...myArray)