If anyone says ternary operators aren't useful they aren't schooled properly in the art of programming. Either way, short of minifying your code, it's good practice not to get too complicated with it. Your second example is getting difficult to understand, and anything beyond that even moreso.
The syntax is fairly universal in other languages.
Yes, the second example is a little extereme and of course I would just suggest using a switch, but I just wanted to let people know it was possible to nest if's.