In Typescript, does anyone know what is this mean?
constructor(obj?:any){
this.id = obj && obj.id || null;
}
Here is my guessing:
It seems like if (obj is not null) and (obj.id has value), then assign obj.id, otherwise, assign null to this.id??
I looked for around 15-20 places(sites/documents), but I still cannot find the answer. I am sorry that I just start learning TypeScript. Anyone knows any good reference? Thank you for your help in advance!