JavaScript Object Reference
JavaScript Objects
Objects are one of JavaScript's data types.
Objects are used to store key/value (name/value) collections.
A JavaScript object is a collection of named values.
The following example creates a JavaScript object with four key/value properties:
For a tutorial about objects, read our JavaScript Object Tutorial.
JavaScript Object Methods and Properties
姓名 | 描述 |
---|---|
构造函数 | Returns the function that created an object's prototype |
键() | Returns an Array Iterator object with the keys of an object |
原型 | Let you add properties and methods to JavaScript objects |
到字符串() | Converts an object to a string and returns the result |
的价值() | Returns the primitive value of an object |