📜  立即调用函数 javascript 代码示例

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

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