JS数据类型

JavaScript 李康
文章标签: JS

js中的数据类型分为两种:基本数据类型和引用数据类型。

基本数据类型:undefined,null,boolean,number和string;

引用类型数据:Object,Array,Function,Date等(其都是对象)。


JS基本类型:

string——字符串类型

Boolean——布尔类型(布尔(逻辑)只能有两个值:true 或 false

number——数字类型

undefined——未定义类型 (Undefined 这个值表示变量不含有值。

null——空对象

————使用typeof()检测数据类型

更详细的https://www.cnblogs.com/cxying93/p/6106469.html

希望对大家有帮助

还能输出{{restrictNumber}}个字符  
  • {{reply.author}}

    {{CommonUtil.formateDate(reply.ac_CommentDate).shortTime}}
  • 回复了{{Comments.author}} :