Is it possible to add properties to an object at runtime? Everything seems to be in order, but are there any issues I should be aware of?
I use a third-party javascript API that has an object class that I created and added my own property after creating the instance, for example, the code below:
For example, can I do this:
var Car = function (id, type) { this.id = id; this.type = type; }; var myCar = new Car(1,"Nissan");
javascript
capdragon
source share