class Person {
constructor(){
this._fullName = "Muhammad Reza Fahlevi";
this._hobby = "Anything that i can do at home.";
}
talk(order){
switch(order){
case 1:
console.log(`Hi there, it's a pleasure to meet you. I'm ${this._fullName}.`);
case 2:
console.log(`My hobby is ${this._hobby}.`);
case 3:
console.log("I like something sweet, but I do not want to overdose,
so I also like something bitter, but not as much as something sweet.");
break;
default:
console.log("The weather is really nice today, isn't it?");
}
}
}
Thanks for stopping by!
The images used here don't represent me, i only edit them and they're not mine, ownership stays with their respective owners.