📜  ife - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:03:03.757000             🧑  作者: Mango

代码示例1
//IIFE, aka, 'Immediately Invoked Function Expression'
//The syntax for defining an IIFE can be seen in the following example:

(function(a,b){         
     return a + b; 
})(10,20);

//You can also use an arrow function in defining an IIFE:
(() => {     
    //... 
})();