how to use ternary if else with two or more condition using "OR" and "AND" like
if(foo == 1 || foo == 2)
{
do something
}
{
else do something
}
i want to use it like
foo == 1 || foo == 2 ? doSomething : doSomething
foo == 1 || foo == 2 ? doSomething : doSomething
is valid, even without extra parentheses. – Mcclelland