In an angular 4 model, I have some typescript code that looks like this:
export class Thing {
public a: number;
public b: number;
public c: number;
constructor(a, b, c){
this.a = a || 0;
this.b = b || 0;
this.c = c || 0;
}
}
This seems an obvious place to use a loop, or something simpler than declaring variables a, b, and c and then following up with assigning a, b, and c, via the constructor.
Not sure how to get that done though.