I have simple if/else statement,and it works normally,but doesn't work when I replace it with if/else statement using ternary operator.
if (UPorDOWN == -1 ) {
SEC_IN_VIEW++
} else{
SEC_IN_VIEW--
}
That works,but how can I make that work using if/else statement with ternary operator. I tried this.
(UPorDOWN == -1 ) ? SEC_IN_VIEW++ : SEC_IN_VIEW--
Aucun commentaire:
Enregistrer un commentaire