Premium Only Content

JavaScript CONSTRUCTORS in 5 minutes! ðŸ›
#JavaScript #tutorial #course
// 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");
car1.drive();
car2.drive();
car3.drive();
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);
-
1:51:18
Redacted News
2 hours ago"There will be consequences!!!" Trump issues big threat to Putin ahead of peace summit | Redacted
66.6K41 -
53:14
Candace Show Podcast
2 hours agoThe MOST MORAL Blackmail In The World | Candace EP 231
18.8K66 -
1:11:28
vivafrei
4 hours agoMatt Taibbi Getting "Westfalled"? Kathy Hochul Fighting for Illegals! Mamdani Minority Report & MORE
70K28 -
2:03:39
Pop Culture Crisis
4 hours agoWTF Happened to Miley Cyrus? HARRY POTTER Set Images, Sydney Sweeney Hater EXPOSED | Ep. 901
18.4K17 -
10:17
MattMorseTV
4 hours ago $5.37 earnedTrump's DOJ just DROPPED a NUKE.
23.8K30 -
11:07
Politibrawl
12 days agoRepublican rising star DESTROYS theatrical Democrat in front of the entire world
66.7K28 -
StoneMountain64
5 hours agoOnly game with BETTER desctruction than Battlefield?
45.7K -
4:51:37
Viss
6 hours ago🔴LIVE - Viss & Dr Disrespect Take on The 5 Win Minimum PUBG Challenge!
21.7K2 -
LIVE
sophiesnazz
3 hours ago $0.52 earnedLETS TALK ABOUT BO7 !socials !specs
33 watching -
1:12:05
The Quartering
5 hours agoToday's Breaking News!
82.3K43