class Man {
//JavaScript doesn't have function overloading,
//including for methods or constructors.
constructor(name, country) {
this.name = name;
this.country = country;
}
}
let man1 = new Man("Vladimir", "Russia");
//man1.name is "Vladimir"
//man1.country is "Russia"
let man2 = new Man("Anna");
//man2.name is "Anna"
//man2.country is undefined
console.log(man1.name);
console.log(man1.country);
console.log(man2.name);
console.log(man2.country);