Guest User

Untitled

a guest
May 30th, 2020
52
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.    toString() {
  9.         return `${this.firstName} ${this.lastName} (age: ${this.age}, email: ${this.email})`;
  10.     }
  11. }
  12. return [
  13.     new Person('Anna', 'Simpson', 22, 'anna@yahoo.com'),
  14.     new Person('SoftUni'),
  15.     new Person('Stephan', 'Johnson', 25),
  16.     new Person('Gabriel', 'Peterson', 24, 'g.p@gmail.com'),
  17. ]
  18. }
RAW Paste Data