So far from I have been searching through the net, the statement always have if and else condition such as a ? b : c. I would like to know whether the if<
Well in JavaScript you can simply do:
expression ? doAction() : undefined
since that's what's literally actually happening in a real if statement, the else clause is simply undefined. I image you can do pretty much the same thing in (almost?) any programming language, for the else clause just put a null-type variable that doesn't return a value, it shouldn't cause any compile errors.