As you know in Javascript, the following expression is very often used as IIFE ( I immediately I nvoked F unaction E ):
(function(){
})();
I wonder if we can say that the following expression is IIFE (when no return value is required):
new function(){
}
Or
new function(global){
}(this);
Even if it is an object. Thank.
Answer:
[Thanks @le_m, @ vol7ron and @Bergi, here is a short answer] Can we say that his next expression is IIFE ( I immediately I nvoked F unction E xpression)?
new function(){
}
or
new function(global){
}(this);
.
?
, ( ).