Skip to content

Instantly share code, notes, and snippets.

@QuatoHub
Created September 8, 2021 07:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save QuatoHub/aff3f814bbf3153b748f3250900f819c to your computer and use it in GitHub Desktop.
Save QuatoHub/aff3f814bbf3153b748f3250900f819c to your computer and use it in GitHub Desktop.
function foo() {
return;
{
}
// ASI의 동작 결과 => return; {};
// 개발자의 예측 => return {};
}
console.log(foo()); // undefined
var bar = (function () {})(function () {})();
// ASI의 동작 결과 => var bar = frunction () {}(function() {})();
// 개발자의 예측 => var bar = frunction () {}; (function() {})();
// TypeError: (intermediate value)(...) is not a funtion
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment