Ternary operations can also be embedded inside each other to create one line of execution rather than several lines. *It is important to take into account that this may affect the readability of your code.*
To embed more ternary operations within another ternary operation, you only have to follow the same pattern as above with each new ternary operation added. You will start with a primary ternary operation, which will consequently lead to your other ternary operations based on boolean expressions. You can branch each ternary operation based off of the `true` and/or `false` paths of the ternary operations, but we are going to focus on going off the `false` path for the ternary operation for the example code below, as most complicated ternary operations will be embedded in the `false` path.
Let's say we have a result `myResult` that is an `int` and can be 0, 1, or greater than 1. And we would like to output `"Just Starting"` if `myResult` is 0, `"First Place"` if `myResult` is 1, and `"If you're not first, you're last."` if `myResult` is 2 or greater. So, we need 3 outcomes for this ternary operation.
You can continue this pattern to embed as many ternary operations as you wish, although it is **not recommended** to use more than a couple ternary operations in your code as it will drastically reduce the readability if you need to have someone else read it, contribute to it, etc.