P. 1
JavaScript Language Specification(ECMA-262)

JavaScript Language Specification(ECMA-262)

|Views: 59|Likes:
Publicado porrayaspnet


More info:

Published by: rayaspnet on Jun 06, 2011
Direitos Autorais:Attribution Non-commercial


Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less





When Object is called as part of a new expression, it is a constructor that may create an object. new Object ( [ value ] )

When the Object constructor is called with no arguments or with one argument value, the following steps are

1. If value is supplied, then
a. If Type(value) is Object, then
i. If the value is a native ECMAScript object, do not create a new object but simply return

ii. If the value is a host object, then actions are taken and a result is returned in an
implementation-dependent manner that may depend on the host object.
b. If Type(value) is String, return ToObject(value).
c. If Type(value) is Boolean, return ToObject(value).
d. If Type(value) is Number, return ToObject(value).
2. Asset: The argument value was not supplied or its type was Null or Undefined.
3. Let obj be a newly created native ECMAScript object.
4. Set the [[Prototype]] internal property of obj t to the standard built-in Object prototype object (15.2.4).
5. Set the [[Class]] internal property of obj to "Object".
6. Set the [[Extensible]] internal property of obj to true.
7. Set the all the internal methods of obj as specified in 8.12
8. Return obj.

You're Reading a Free Preview

/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->