, Column SAME model . Column model.name.
, , , :
var BaseColumn = function() {
this.model = {};
this.model.name = "";
this.name="";
};
BaseColumn, model name new.
var Column = function (name) {
this.model.name = name;
this.name = name;
};
Column, . new Column() , this.model ( ).
Column.prototype = new BaseColumn();
, BaseColumn. , , Column. ? , Column (col1 col2) , . Column , .
var col1 = new Column("Column1");
, Column.prototype.model.name == "Column1"?
var col2 = new Column("Column2");
Column.prototype.model.name "Column2" `. , . SHARED.
, , model Column.
, Juan Mendes. . / ().