in the following example, do the assignment statements execute in order?

in the following example, do the assignment statements execute in order?
 
const externalClass = require('./externalClass');

class testClass {
constructor() {
this.externalClass = new externalClass();
this.test = function() {
//this.externalClass.log();
console.log(`this.externalClass is: ${this.externalClass}`);
}
}
}
such that this.externalClass can be used in this.test function
it seems to be failing
You already invited:

victor - System developer

Upvotes from:

What are you exporting? Its working for me. My module.exports is like:
 
module.exports = class  {
constructor(){
console.log("hello world");
}
}

If you wanna answer this question please Login or Register