You have a function which name doesn't explain what the function does.
Improve code readability.
Replace the name of the function.
Replace the name of the function everywhere is used.
For simplicity, I commented the code that is not changed.
/*class Person{
constructor(firstName, lastName, dateOfBirth){
this.firstName = firstName;
this.lastName = lastName;
this.dateOfBirth = dateOfBirth;
}*/
getFName(){
return this.firstName + ' ' + this.lastName;
}
//}/*class Person{
constructor(firstName, lastName, dateOfBirth){
this.firstName = firstName;
this.lastName = lastName;
this.dateOfBirth = dateOfBirth;
}*/
getFullName(){
return this.firstName + ' ' + this.lastName;
}
//}