Visit Mozilla.org

Core JavaScript 1.5 Guide:Creating New Objects

From MDC


[edit] Creating New Objects

JavaScript has a number of predefined objects. In addition, you can create your own objects. In JavaScript 1.2 and later, you can create an object using an object initializer. Alternatively, you can first create a constructor function and then instantiate an object using that function and the new operator.

« Previous Next »