class Me {
constructor(name, hobbies, city) {
this.name = name;
this.hobbies = hobbies;
this.city = city;
}
introduce() {
return `Hello, my name is ${this.name}, I like ${this.hobbies.join(', ')}, and I live in ${this.city}.`;
}
}
const name = "Denis Setiawan";
let hobbies = ['Coding', 'Reading books', 'Computer tinkering'];
let city = "Yogyakarta";
const me = new Me(name, hobbies, city);
console.log(me.introduce());
🎯
Focusing
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.