Properties of an object can be defined dynamically after its creation : Properties : Object Oriented JAVASCRIPT TUTORIALS


JAVASCRIPT TUTORIALS » Object Oriented » Properties »

 

Properties of an object can be defined dynamically after its creation













var myHourse = new Object;
myHourse.color = "red";
myHourse.doors = 4;
myHourse.showColor = function () {
    alert(this.color);
};







HTML code for linking to this page:

Follow Navioo On Twitter

JAVASCRIPT TUTORIALS

 Navioo Object Oriented
» Properties