📜  立即调用的函数表达式 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:03:52.144000             🧑  作者: Mango

代码示例3
(function () {
    var aName = "Barry";
})();
// Variable aName is not accessible from the outside scope
aName // throws "Uncaught ReferenceError: aName is not defined"