how to create an object with a function in javascript code example
Example: js create object with properties
function Car(make, model, year) {
this.make = make;
this.model = model;
this.year = year;
}
function Car(make, model, year) {
this.make = make;
this.model = model;
this.year = year;
}