How to write an abbreviated expression for else if?
if (showvar == "instock"){ //show available } else if (showvar == "final3"){ //show only 3 available } else { //show Not available }
I know writing when there is only if
and else
. But how to write it when there is an else if
?
(showvar == "instock")? //show available : //show Not available
source share