Advertisement
kstoyanov

06. Person

Sep 20th, 2020
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. class Person {
  2.     constructor(firstName, lastName, age, email) {
  3.       this.firstName = firstName;
  4.       this.lastName = lastName;
  5.       this.age = age;
  6.       this.email = email;
  7.     }
  8.  
  9.     toString() {
  10.       return `${this.firstName} ${this.lastName} (age: ${this.age}, email: ${this.email})`;
  11.     }
  12.   }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement