JavaScript學(xué)習(xí)筆記二
- 個人學(xué)習(xí)筆記
- 參考阮一峰的JavaScript教學(xué)
- 學(xué)習(xí)筆記二是對學(xué)習(xí)筆記一的補(bǔ)充
JavaScript歷史

image
ECMAscript是JavaScript標(biāo)準(zhǔn)
ES 5 新增特性匯總-方應(yīng)航知乎專欄(15個小變化)
ES 6 新增特性匯總-方應(yīng)航知乎專欄
以后一年一次
ES 7(2016)只增加了兩個特性,ES 8(2017)只增加了10個特性
ES5-->ES6功能最多
數(shù)據(jù)類型補(bǔ)充
number string symbol boolean null undefined object

image
number

image
字符串

image
多行字符串

image
ES6新特性,多行字符串可以用`反引號,需要注意的是,空格和回車都算字符串里的一個字符

image

image
null和undefined

image
區(qū)別:

image
對象

image
in 只查看key是否存在

image

image

image
for in循環(huán)注意點(diǎn)
for(var key in person){
console.log(person.key)
}
注意:person.key = person['key']
要用
person[key]

image
for... in可能會隨機(jī)遍歷,不按照聲明順序

image
typeof BUG

image