// Complex Constructor
class Person {
constructor (firstName, lastName, age) {
if (!firstName) throw new TypeError('Argument 1: firstName is requried.')
if (!lastName) throw new TypeError('Argument 2: lastName is requried.')
if (!age) throw new TypeError('Argument 3: age is requried.')
this.firstName = firstName
this.lastName = lastName
this.age = age
}
static clone (personObj) {
return new this(personObj.firstName, personObj.lastName, personObj.age)
}
}