Skip to content
Advertisement

Is it posiable to use exported variable in class in the same file its exported

Is it possible to use the exported variable in class in the same file its exported?

exports.var = "something";

class c {
  constructor() {
    this.var = var;
  }
}
export.class = class;

Advertisement

Answer

Yes. this.var = exports.var; answer by Patrick Hund

User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement