How do constructor Function () arguments pass quoted parameters and unquoted parameters operate on local variables and external variables?

(function(){
        var call = "23";
       Function(console.log(call))(); //23
    })();

print is 23

(function(){
        var call = "23";
       Function("console.log(call)")(); //
    })();

I don"t understand why the result of an unquoted parameter is different from that of an unquoted parameter.

Apr.07,2021

Let's put it this way, first of all, make one thing clear.

(function(){ 
    //code
})();

this is used to create closures, regardless of this.
then look directly inside.

Function is the prototype of all javascript functions, and you can create a function through the
Function (args) method.

in the first example, what is passed to the Function function is console.log (call)
in the closure, call = "23", console.log is executed immediately, so the result is actually
Function (undefined) (),

. For the second example, take a look at MDN, MDN that makes it clear that variables within the
clipboard.png
closure will not be referenced, so although a function

has been successfully created here
 anonymous() {
console.log(call)
}

but it does not have the scope of call and will report a call is undefined error when it is executed immediately.

this question is mainly about this feature of Function

Menu