Hi Tanaike,
Thanks again for your help, much appreciated !
I have an other question regarding the Class declaration.
I've tried to create a GlobalParameters class.
My aim was to manage efficiently in one location all my parameters used in all my other classes.
Here an example :
var GlobalParameters = class GlobalParameters {
constructor(){
this.param1 : param1;
this.param2 : param2;
this.param3 : param3;
}
var MyOtherClass = class MyOtherClass extends GlobalParameters {
constructor(){
super();
}
myFunction(){
this.param1... is processed
this.param2... is processed
etc...
}
Unfortunately, it's not working that way. After few research it looks like i should do like this :
class A {
constructor() {
this.data = data;
}
}
class B {
constructor() {
this.instanceOfA = new A();
console.log(this.instanceOfA.data);
}
}
What do you think ?
Do you have a more efficient option ?
Many thanks for your help
David