class Car { constructor(make, model) { this.make = make; this.model = model; this.userGears = ["P", "N", "R", "D"]; this.userGear = this.userGears[0]; } shift(gear) { if (this.userGears.indexOf(gear) < 0) throw new Error(`Invalid gear: ${gear}`); this.userGear = gear; } } const carA = new Car("Kia", "Morning"); const carB = new Car("Tesla", "Model S"); car1.shift("D"); car2.shift("R"); 프로토타입 클래스..