mardi 4 août 2015

How to write ELSE IF using ? : in javascript

I tried if else in javascript using ? : Ex : (i > 0 ? 'test': 'test1')

But i need if() { } esle if() { } else if() { } else (){ } using ? : operators Reason am using operators is am appending the table in Jquery so i need to write the logic in between append statements

can any one help me in this

Aucun commentaire:

Enregistrer un commentaire