why a named 'Self-Executing Anonymous Function' not pollute the global scope?
chrome 75
//below is named 'Self-Executing Anonymous Function'
(function funcName(params) {
})()
// below is unnamed 'Self-Executing Anonymous Function'
(function (params) {
})()
As shown,an unnamed 'Self-Executing Anonymous Function' will not pollute the global because it has no name. but if the function has a name? Which has been tested,the named 'Self-Executing Anonymous Function' will not pollute the global either.
As is knowledged to all, the only way to seperate the scope is to define a function,but what happened now? the parentheses can do this? Or maybe this is just a syntax-sugar specially defined?