Mega Code Archive

 
Categories / JavaScript Tutorial / Object Oriented
 

Object()

Syntax var variable = new Object(string) The Object() object is a primitive data type from which all JavaScript objects are derived. Properties of the Object() Object Property Description constructor Function that creates an object eval() Evaluates a string of JavaScript code for the specified object prototype Prototypes new properties for the specific object toSource() Returns a string representation for the object toString() Converts the object to its string representation unwatch Removes a watchpoint for the object valueOf Returns the value of the specific object watch Adds a watchpoint to the object property <html>     <body>     <script language="JavaScript">     <!---     var myObj = new Object("foo");     document.write("Object foo created");     -->     </script>     </body>     </html>