In TypeScript, is there any difference between giving the class property its initial value on definition vs in the constructor?
class Car {
engine = 'hybrid';
}
VS.
class Car {
engine: string;
constructor() {
this.engine = 'hybrid';
}
}