szukałem konstruktora lub funkcji init do następującej sytuacji:Konstruktor lub init dla obiektu
var Abc = function(aProperty,bProperty){
this.aProperty = aProperty;
this.bProperty = bProperty;
};
Abc.prototype.init = function(){
// Perform some operation
};
//Creating a new Abc object using Constructor.
var currentAbc = new Abc(obj,obj);
//currently I write this statement:
currentAbc.init();
Czy istnieje sposób, aby wywołać funkcję init, gdy nowy obiekt jest inicjowany?
Umieść go w contructor. –