I want to replace the console.log output with a windows alert displaying all persons data.
class person {
constructor(name, job, color, age, licExpiryDate) {
this.personsname = name;
this.jobtitle = job;
this.haircolor = color;
this.personsage = age;
this.licenseExpiryDate = licExpiryDate;
}
}
let person1 = new person('David Smith', 'Marketing Manager', 'Brown', 25, '2020-06-01');
console.log(person1);
Tried replacing console.log with alert( person1 ) ; but did not work.