The JavaScript Object Object

The JavaScript Object global object creates an object wrapper for any given value:

var obj = new Object([value])

If the value is null or undefined, the Object constructor creates an empty object. Otherwise, it will create an object of a type that corresponds to the given value:

var number_object = new Object(123); // equivalent to number_object = new Number(123);
var array_object = new Object([1, 2, 3]); // equivalent to array_object = new Array([1, 2, 3]);

Object Properties

Returns a reference to the function that created the Object object
Allows the addition of properties and methods to all objects

Object Methods

Returns true if the object has the specified property, or false otherwise
Returns true if the object is in the specified object's prototype chain, or false otherwise
Indicates whether the specified property is enumerable (i.e. can be enumerated in a loop)
Returns a locale-aware string representation of the Object object
Returns a string representation of the Object object
Returns the primitive value of the object

If you see a typo, want to make a suggestion or have anything in particular you'd like to know more about, please drop us an e-mail at hello at diveintojavascript dot com.

Copyright © 2010-2013 Dive Into JavaScript