例一 括号内可见
var times = 0; (function hello(){ console.log('hello~'); ++times<2&&hello(); })();
例二 括号外不可见
(function hello(){ console.log('~hello'); }); console.log(hello);
posted on 2018-09-29 14:12 沙滩海风 阅读(236) 评论(0) 收藏 举报
博客园 © 2004-2025 浙公网安备 33010602011771号 浙ICP备2021040463号-3