会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
嘎己人
博客园
首页
新随笔
联系
订阅
管理
2020年10月9日
js不用var声明变量问题
摘要: function f1(){ n = 999; nAdd = function(){ console.log('nAdd') } } f1(); console.log(n); // 999 console.log(nAdd()); // 'nAdd' 当不声明变量,直接赋值时,改变量会自动创建成全
阅读全文
posted @ 2020-10-09 22:25 嘎己人
阅读(1211)
评论(0)
推荐(0)
公告