var Car = function() { this.wheels = 4; this.engines = 1; this.seats = 1; }; var myCar=new Car(); // 使用构造函数时,我们通过在它前面使用new关键字来对它进行调用
var Car = function(wheels,seats,engines) { this.wheels =wheels; this.seats = seats; this.engines = engines; }; var myCar=new Car(1,2,3); // 可以使用形参的方法,来实例化出不同的对象来