"Ternary" means having three parts. It is related to the words "unary" (one part), and "binary" (two parts). So, because there are three parts to the operation:
CONDITION ? TRUE : FALSE
That is why it's called a "ternary operation." Technically, any if statement can be a ternary operation:
if CONDITION {
TRUE
} else {
FALSE
}
The else, if not included, is implied. It's as if you said "else do nothing."
However, because the short version requires both the TRUE and FALSE parts of the operation, it got the name "ternary operation."
Leave it to a geek to give a fancy name to such an operation -- "3-part operation." I guess someone just wanted to sound smart, and the name stuck 🙂