If I have:
logicBeingTested.isItTrue ? (status = true) : (status = false);
how do I make it so if my argument is true it only does the true half of that statement and not false. I tried doing this:
logicBeingTested.isItTrue ? (status = true) : ();
but that doesn't work. I know I can get around this by just doing an if statement but for curiosity's sake is it possible to give an answer of do nothing to an argument?
Aucun commentaire:
Enregistrer un commentaire