Lets say that I have a class like this
class Vector {
constructor(x,y) {
this.x = x
this.y = y
}
}
How can i do something like this
class Vector {
constructor() {
}
var x;
var y;
}
var v = new Vector()
v.x = 3
v.y = 4
I basically want to declare my variables outside the constructor. Done some research. Found nothing