lundi 26 septembre 2016

How to make an else if and else in this If Statement

I have this if statement below. It is possible to add / make it in if - else if - else ?. If not tell me the reason. Thanks. Cheers

var num1;
var num2 = 1;

num1 = num2 != 0  ? num2 : "";

alert(num1);

Aucun commentaire:

Enregistrer un commentaire