Js eval function parsing problem?

officially, the eval () function evaluates a string and executes the JavaScript code in it.
but I don"t understand why it parses the array according to the extension operator. For the
question, please move to my own answer, ~

.
Feb.22,2022

the result of your output like this is actually


function test1(a, b, c) {
    console.log(a, b, c)  
}
eval("test1(" + [1,2,3] + ")") //1 2 3
function test2(a, b, c){
    console.log(a, b,c) 
}
let arr = [1,2,3]
test2(...arr)    //1 2 3
function test3(){
    console.log(...arguments) 
}
test3(1,2,3)    //1 2 3

function test4(a) {
    console.log(a)
}

function check() {
    eval("test4(" + "arguments" +")")
}
check(1,2,3)  //Arguments(3)[1, 2, 3, callee: , Symbol(Symbol.iterator): ]
check([1,2,3])  //Arguments[Array(3), callee: , Symbol(Symbol.iterator): ]
,
eval,~
Menu