New course! Every coder should learn Generative AI!
Try a free lesson0
to create a constructor function
to create a constructor function
1 Answer
+ 6
class Car {
constructor(color, brand) {
this.color = color;
this.brand = brand;
}
}
let car = new Car("black", "Mercedes");