基本數據類型:
number boolean string null undefined symbol(es6)
number的方法:
? ? isNaN();?
? ? Number();?
? ? parseInt();
? ? parseFloat();
什么情況下會出現 undefined?
? ? 1.對象中沒有某個屬性? ? ?2.函數沒有返回值? ? ?3.聲明未定義
什么時候使用null
? ? 1.初始化一個值 2.清空一個對象 3.清除DOM點擊事件
它們的特殊點
? ? null,undefined 沒有toString方法
string的方法:
? ? substr? subString indexOf/lastIndexOf? split replace match search() toUpperCase toLowerCase charAt concat fixed
引用數據類型: