Answers for "javascript casting objects"

-1

javascript casting objects

class Person {
  constructor(obj) {
    obj && Object.assign(this, obj);
  }

  getFullName() {
    return `${this.lastName} ${this.firstName}`;
  }
}
Posted by: Guest on October-29-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language