Kód: Vybrať všetko
var cr= new Array();
function Car(c,t,r) {
this.color = c ;
this.type = t;
this.rok = r;
}
cr[0]= new Car("red","vw","1994");Kód: Vybrať všetko
var cr= new Array();
function Car(c,t,r) {
this.color = c ;
this.type = t;
this.rok = r;
}
cr[0]= new Car("red","vw","1994");
Kód: Vybrať všetko
var cr= new Array();
function Car(c,t,r) {
this.color = c ;
this.type = t;
this.rok = r;
this.toString = function() {
return this.color + " " + this.type + " " + this.rok;
}
}
cr[0]= new Car("red","vw","1994");
document.write( cr[0].toString() );Kód: Vybrať všetko
var cr= new Array();
function Car(c,t,r) {
this.color = c ;
this.type = t;
this.rok = r;
}
Car.prototype.toString = function(){
return this.color + " " + this.type + " " + this.rok;
}
cr[0]= new Car("red","vw","1994");
document.write( cr[0].toString() );