Javascript – Create new object dynamically
Is there a way of adding an object without having to declare a const? function Car (make, color) { this.make = make, this.color = color, this.greet = function () { console.log(`The make is ${this.make} and color is ${this.color}`); }; }…