js的数据类型分析一

摘自ECMA-262规范

Primitive Value
A primitive value is a member of one of the types Undefined, Null, Boolean, Number, or String. A
primitive value is a datum that is represented directly at the lowest level of the language implementation.

js有5种原始数据类型:Undefined,Null,Boolean,Number,String.

注意:第一个字母为大写。

A primitive value is a member of one of the following built-in types: Undefined, Null, Boolean, Number, and String; an object is a member of the remaining built-in type Object; and a method is a function associated with an object via a property

以上5种原始值为5种内置类型,剩下一种内置类型为object,注意此处为小写;方法是一个函数(对象的一个属性)。

These built-in objects include the Global object, the Object object, the Function object, the Array object,
the String object, the Boolean object, the Number object, the Math object, the Date object, the RegExp
object and the Error objects Error, EvalError, RangeError, ReferenceError, SyntaxError, TypeError
and URIError.

内置object包括:Global ,Object ,Funtion,Array,String,Boolean,Number,Math,Date,RegExp,另外还有一些Error object。

这里的String,Boolean,Number为内置对象,不要和上面的内置type混淆了。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值