所以我有两个对象
var Vehicle = {
type:"4 wheel vehicle",
run: function(){
console.log(this.type + " is running.";
}
}
var Car = {
type:"Car"
}
Car.run();
这应该打印“汽车正在运行”,我知道我绝对可以做到
var Car = Object.create(Vehicle);
Car.type = "Car";
Car.run();