Since the implementation of the difference between the function name and function

 
Naming function and normal function needs to be anonymous call; self-executing function once defined, can be performed immediately.
<Script> 
     // printing variables before assigning undefined; the other assignment, outputs;      the console.log (A); // undefined var A = 10 ;
console.log(a);//10 var a=function(){ console.log ( "OK"); // before the call is not not print OK } a();//OK console.log(function(a){ return a; } ( "Definition Executive" )); // define implementation </ script>

Results of the

 

 

 

Guess you like

Origin www.cnblogs.com/miniSkytrue/p/12168895.html