摘要: # 函数2 # ### 函数提升 ### console.log(addnum); function addnum(a,b){ return a+b; }函数和用var申明变量一样,也存在提升 只要不用var声明就不会产生全局变量###1,函数申明 function addnum(a,b){ ret 阅读全文
posted @ 2017-09-10 11:01 刘畅A 阅读(129) 评论(0) 推荐(0) 编辑
摘要: # 函数 ### 什么是函数,函数作用,什么时候使用函数##函数具有独立功能,并能通过名称重复使用的代码,当页面有许多重复代码时候。 函数声明用function 函数声明 函数名 function add(){ console.log('你好'); }**注意:**别忘记 JavaScript 中大 阅读全文
posted @ 2017-09-10 10:59 刘畅A 阅读(103) 评论(0) 推荐(0) 编辑