JS高级_数据类型

1.分类:

  a.基本(值)类型:

    * String :任意字符串

    * Number :任意数字

    * boolean : true/false

    * undefined :undefined

    * null :null

  b.对象(引用)类型:

    * Objeact: 任意对象

    * Function: 一种特别的对象(可以执行)

    * Array:一种特别的对象(数值下标,内部数据是有序的)

2.判断:

  *typeof:

    可以判断:undefined/数值/字符串/布尔值/function

    不能判断:null/object

  *instanceof:

    判断对象的具体类型

  *===

    可以判断undefined/null

猜你喜欢

转载自www.cnblogs.com/nailc/p/9724900.html