to create a constructor function | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

to create a constructor function

to create a constructor function

30th Aug 2019, 10:14 AM
DineSh
DineSh - avatar
1 Answer
+ 6
class Car { constructor(color, brand) { this.color = color; this.brand = brand; } } let car = new Car("black", "Mercedes");
30th Aug 2019, 10:48 AM
r8w9
r8w9 - avatar