构造函数
//创建一个车对象,该对象要有重量、颜色、牌子、还有功能
function Car(weight,color,logo){
this.weight=weight;
this.color=color;
this.logo=logo;
this.user=function (done) {
console.log(done);
}
}
var benz=new Car('1吨','black','奔驰');
benz.user('拉水泥');
console.log(benz.weight);
console.log(benz.color);
console.log(benz.logo);