dimanche 12 juillet 2020

Typescript If statement with multiple value matches for the same variable

Is there a shorter way to manage a list of matching values for the same variable in a Typescript IF statement?

if(X==5 || X==undefined || X=="") {
     //do something...
}

Aucun commentaire:

Enregistrer un commentaire