1)function A(){}; // function declaration 2) var B = function(){}; // function expression 3) var C = (function(){}); // function expression with grouping operators 4) var D = function foo(){}; // named function expression 5) var E = (function(){ // immediately-invoked function expression (IIFE) that returns a function return function(){} })(); 6) var F = new Function(); // Function constructor 7) var G = new function(){}; // special case: object constructor
No comments:
Post a Comment