Is it bad practice to use a constructor properties of a class within a variable? I tried this and was surprised const name = new Name(time, course);
worked, although I guess it makes sense since an instance of Eng
needs those constructor properties to be made, then they’d be available to use elsewhere.
import { Name } from './Name'
class Eng {
private _name = new Name(time, course);
private constructor(time: String, course: String) {}
method1(){
let results = name.convertTrials();
return results;
}
}