cara memohon fungsi di kelas
class Wizard{
constructor(name, age, favoriteSpell){
this.name = name;
this.age = age;
this.favoriteSpell = favoriteSpell;
}
// function that is being envoked
castSpell() {
console.log(`${this.name} has cast ${this.favoriteSpell}`)
}
}
let gandolf = new Wizard('gandolf', 998, '')
gandolf.castSpell()
Different Dugong