Grammar one:
Copy the code code as follows:
function sayWhat(msg){
alert(msg);
}
sayWhat("Hello");
Equivalent to the following syntax (js closure (anonymous self-executing function) syntax):
Copy the code code as follows:
(function(msg){
alert(msg);
})("Hello");