It is called ternary expression because of the ternary operator (?:). Word Ternary indicates “three” means it takes 3 arguments and is one-lined shorthand for an if-then statement.

BY Best Interview Question ON 17 Jan 2021