how to use ternary if else with two or more condition using \"OR\" and \"AND\" like
if(foo == 1 || foo == 2) { do something } { e
it is easy,
if(foo == 1 || foo == 2) { do something } { else do something }
it can be written thus for OR statement
OR
foo==1 || foo==2 ? do something : else do something
it can be written thus for AND statement
AND
foo==1 && foo==2 ? do something : else do something
both will work perfectly