How this works?
void function() {}()
I saw an explanation that void transforms the iife from declaration to expression, and every expression must be evaluated, is this right?
Thanks.
How this works?
void function() {}()
I saw an explanation that void transforms the iife from declaration to expression, and every expression must be evaluated, is this right?
Thanks.
When using an immediately-invoked function expression, void can be used to force the function keyword to be treated as an expression instead of a declaration. Check this link at MDN
 
    
    When using an immediately-invoked function expression, void can be used to force the function keyword to be treated as an expression instead of a declaration.
Readup:  void operator - Javascript | MDN
