js笔记4

1、函数   关键词(function) var是js的关键字,用于声明变量,声明在内存模块完成,定义(=)是在执行模块完成 var可以在内存模块提前完成(js代码执行前),所以有变量提升这个功能 console.log(b)   undefined console.log(a)    is not defined a=12; var b=13; 因为a没有带var,所以不存在变量提升,浏览器会把
相关文章
相关标签/搜索