lundi 10 juin 2019

Javascript, better way to write an if condition [duplicate]

This question already has an answer here:

Is there a concise or better way to write this condition without having to use so many ||.

if (myVar == 'A' || myVar == 'B' || myVar == 'C'){
   ...
}

Aucun commentaire:

Enregistrer un commentaire