mercredi 5 juin 2019

There is a better way to write if (argList[foo] === "bar" || argList === "bar")?

I have an if statement :

if (argList["foo"] === "bar" || argList === "bar"){
    // some code
}

I want to know if there is a shorter or more elegant way to write this condition.

Aucun commentaire:

Enregistrer un commentaire