class Person {
constructor(name, age, city, occupation, gender) {
this.name = name;
this.age = age;
this.city = city;
this.occupation = occupation;
this.gender = gender;
}
introduce() {
console.log(`Hello, I'm ${this.name}. I am ${this.age} years old, and I live in ${this.city}. I work as a ${this.occupation}, and I am ${this.gender}.`);
}
}
const Novasy = new Person("Alp", 20, "İzmir", "Computer Engineering Student", "Erkek");
Novasy.introduce();
novasy / url-guard Goto Github PK
View Code? Open in Web Editor NEWGüncellemelerle birlikte çalışmayı durdurdu.
License: MIT License