is it possible to call the setter function outside the constructor class?
i.e. i have the following class
class example {
constructor() {
this._partner = 0;
}
get partner() {
return this._partner;
}
set partner(id) {
this._partner = id;
}
}
when i call
friends = new example();
freinds.partner(75);
i see the follwing error:
Uncaught TypeError: example.partner is not a function