I have a typescript code as follows:
constructor(c?: IContact) {
this.id = c ? c.id : null;
this.caseId = c ? c.caseId : null;
this.name = c ? c.name : '';
this.email = c ? c.email : '';
this.isPrimary = c ? c.isPrimary : false;
}
What does the 'c ?' do? And how do I ensure when the user enter the contact the c.email is not null?