📜  对象 javascript 代码示例的新实例

📅  最后修改于: 2022-03-11 15:02:26.201000             🧑  作者: Mango

代码示例1
function Car(make, model, year) {
  this.make = make;
  this.model = model;
  this.year = year;
}

var car1 = new Car('Eagle', 'Talon TSi', 1993);

console.log(car1.make);
// expected output: "Eagle"