Objects
JavaScript is fundamentally about objects. Arrays are objects. Functions are objects. Objects are objects. So what are objects? Objects are collections of name-value pairs. The names are strings, and the values are strings, numbers, booleans, and objects (including arrays and functions). Objects are usually implemented as hashtables so values can be retrieved quickly.
Object类具有下列属性:
Constructor对创建对象的函数的引用(指针)。对于Object类,该指针指向原始的object()函数。
Prototype对该对象的对象原型的引用。对于所有的类,它默认返回Object对象的一个实例。
JavaScript is fundamentally about objects. Arrays are objects. Functions are objects. Objects are objects. So what are objects? Objects are collections of name-value pairs. The names are strings, and the values are strings, numbers, booleans, and objects (including arrays and functions). Objects are usually implemented as hashtables so values can be retrieved quickly.
Object类具有下列属性:
Constructor对创建对象的函数的引用(指针)。对于Object类,该指针指向原始的object()函数。
Prototype对该对象的对象原型的引用。对于所有的类,它默认返回Object对象的一个实例。
本文介绍了JavaScript中对象的基本概念,解释了对象是由名称-值对组成的集合,并详细说明了对象可以包含的各种类型的数据,如字符串、数字、布尔值及其它对象等。此外还提到了对象的实现通常采用哈希表形式以便快速检索。
5640

被折叠的 条评论
为什么被折叠?



