1class Person {
2 constructor(fname, lname) {
3 this.firstName = fname;
4 this.lastName = lname;
5 }
6}
7
8const person = new Person('testFirstName', 'testLastName');
9
10console.log(person.firstName); // testFirstName
11console.log(person.lastName); // testLastName
12
13
1function Car(make, model, year) {
2 this.make = make;
3 this.model = model;
4 this.year = year;
5}
6
7var car1 = new Car('Eagle', 'Talon TSi', 1993);
8
9console.log(car1.make);
10// expected output: "Eagle"
11