O Object() (Function) Object() (Function) An Object (Disney web site)

O Object() (Function) Object() (Function) An Object object constructor. Object(aValue) - aValue A value to be stored in the new object. Argument list: The Object Constructor can be called as a function. When this happens, the value passed in undergoes a type conversion. In an ECMA-compliant implementation, the Object constructor function uses the ToObject conversion. However it handles input values undefined and null as special cases and creates a new object as if the constructor had been used with the new operator. The table summarizes the results based on the input value data types. Availability: ECMAScript edition 2 JavaScript 1.1 JScript 1.0 Internet Explorer 3.02 Netscape 3.0 Property/method value type: An object of a type that depends on the passed in argument -Object() JavaScript syntax: Value Result No argument Creates a new empty object as if new Object()had been called. null Creates a new empty object as if new Object(null) had been called. undefined Creates a new empty object as if new Object(undefined)had been called. Boolean Create a new boolean object whose default value is the input value. Number Create a new number object whose default value is the input value. String Create a new string object whose default value is the input value. Object No conversion, the input value is returned unchanged. See also: Cast operator, Constructor function, constructor property, Implicit conversion, Object object Cross-references: ECMA 262 edition 2 section 15.1.1 ECMA 262 edition 2 section 15.1.3.1 ECMA 262 edition 2 section 15.2.2.2 ECMA 262 edition 3 section 15.2 1579

Leave a Reply