Does JavaScript really have them?
Eeh… not really
class student {
constructor(firstName,lastName){
this.firstName = firstName;
this.lastName = lastName;
}
}
This method to create new objects must be called constructor
The class keyword creates a constant, so you can not redefine it.
class Student {
constructor(firstName,lastName,year){
this.firstName = firstName;
this.secondName = lastName;
this.grade= year
}
}
let firstStudent = new Student("Colt","Steele");
let secondStudent = new Student("Blue","Steele");
firstStudent.firstName