I\'m trying to use this and it doesn\'t appear to be working. I\'m guessing it\'s just not an option, but want to confirm. Is this valid?
(if_it_is) ? thats_cool
No, you can't. It's not an "inline if statement", it's the ternary operator, and that is, well… ternary.
(if_it_is) ? thats_cool() : null;
Since you do not seem to be interested in the return value of the operation, you could just write:
if (if_it_is) thats_cool();
though. That would also be better style than using a ternary.