@BroCodez

// constructor = special method for defining the
//                          properties and methods of objects

function Car(make, model, year, color){
    this.make = make,
    this.model = model,
    this.year = year,
    this.color = color,
    this.drive = function(){console.log(`You drive the ${this.model}`)}
}

const car1 = new Car("Ford", "Mustang", 2024, "red");
const car2 = new Car("Chevrolet", "Camaro", 2025, "blue");
const car3 = new Car("Dodge", "Charger", 2026, "silver");

console.log(car1.make);
console.log(car1.model);
console.log(car1.year);
console.log(car1.color);

console.log(car2.make);
console.log(car2.model);
console.log(car2.year);
console.log(car2.color);

console.log(car3.make);
console.log(car3.model);
console.log(car3.year);
console.log(car3.color);

car1.drive();
car2.drive();
car3.drive();

@tdgstudios2068

You explain it better than anywhere I’ve read and watched. Thank you!

@no-nombre-c4r

love this.

@marinastrong7977

Great video!

@chk3380

best explanation i found on youtube. thanks bud

@RABWA333

thanks a lot, quite clear

@szymonpiechutowski2340

Did you use a function to create Car because the only other way to create a template for an object is class?

@Davidyano600

My head hurts