class Man
{
constructor(name = "unknown", country = "unknown") {
this.name = name;
this.country = country;
}
}
let man1 = new Man();
//man1.name is "unknown"
//man1.country is "unknown"
let man2 = new Man("Vladimir");
//man2.name is "Vladimir"
//man2.country is "unknown"
let man3 = new Man("Vladimir", "Brazil");
//man3.name is "Vladimir"
//man3.country is "Brazil"
console.log("name1 is", man1.name);
console.log("country1 is", man1.country);
console.log("name2 is", man2.name);
console.log("country2 is", man2.country);
console.log("name2 is", man3.name);
console.log("country3 is", man3.country);