For JavaScript code:
var obj = {};
function Rect(w, h)
{
this.width = w;
this.height = h;
}
Rect.prototype.area = function() {
return this.width * this.height;
}
var rect = new Rect(2,4);
var obj = {};
[Note: __proto__ is available on Chrome and Firefox]
For JavaScript code:function Rect(w, h)
{
this.width = w;
this.height = h;
}
Rect.prototype.area = function() {
return this.width * this.height;
}
var rect = new Rect(2,4);
[Note: __proto__ is available on Chrome and Firefox]