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();
Highlights
Pinned Loading
Something went wrong, please refresh the page to try again.
If the problem persists, check the GitHub status page or contact support.
If the problem persists, check the GitHub status page or contact support.