How do I add properties to an instance of a new function?
For example:
function Constructor() {
this.color = "red";
}
var s = new Constructor() {
this.color = "blue";
this.height = 30px;
}
When s.height is invoked, I am getting an undefined result. How does one execute this properly?
1 Answer