Powered by md-Blog  文 - 篇  访客 -

JS的数据类型及typeof()可检测类型


  分类:JS+ES6  / 
更新:2020-11-01 17:25:35  /  创建:2020-04-19 08:22:00
不要删除

JS 的数据类型

【5种】

  1. boolean
  2. number
  3. string
  4. null
  5. undefined
  • 引用类型:Object
  • ES6:Symbol
  • ES10:BigInt

JS 的 typeof 的数据类型

【6种】

  1. boolean
  2. number
  3. string
  4. object
  5. undefined
  6. function

数组、对象用 instanceof 检测。


不要删除

小站不易,感谢支持!