Hello everyone!
I am trying to integrate a method to my class, whose function is to add text.
However, I am getting an error which I am not able to resolve.
My code:
class Options {
addText(a,b,c,d){
a = this.add.text(200,500, a);
b = this.add.text(370,500, b);
c = this.add.text(200,550, c);
d = this.add.text(370,550, d);
}
}
var example = new Options();
example.addText("Text");
And this is the error I get:
The function individually works correctly, but inside a class it gives me an error.
Thanks!