function Car(model, color){
this.model = model;
this.color = color;
}
Car.prototype = {
recolor: function(newColor) {this.color = newColor},
priceOrDefault: function(){return this.price ? this.price : 10000}
}
Object.defineProperty(Car.prototype, "all", {get: function(){ return this.model + " " + this.color} })
var car1 = new Car("BMW ", "Black");
var car2 = new Car("Lada ", "Blue")
car2.price = " 700 000 RUB"
console.log( car1.all, car2.all)
car1.recolor("silver")
console.log( car1.all, car2.all)
console.log(car1.priceOrDefault(), car2.priceOrDefault())