Basic JavaScript: Use the Conditional (Ternary) Operator The conditional operator, also called the ternary operator, can be used as a one line if-else expression. The syntax is: condition ? statement-if-true : statement-if-false; The following function uses an if-else statement to check a condition: function findGreater(a, b) { if(a > b) { return "a is greater"; } else { return "b is greater"; } } This can be re-written using the conditional operator: function findGreater(a, b) { return a > b ? "a is greater" : "b is greater"; } Use Multiple Conditional (Ternary) Operators In the previous challenge, you used a single conditional operator. You can also chain them together to check for multiple conditions. The following function uses if, else if, and else statements to check multiple conditions: function findGreaterOrEqual(a, b) { if (a === b) { return "a and b are equal"; } else if (a > b) { return "a is greater"; } else { return "b is greater"; } } The above function can be re-written using multiple conditional operators: function findGreaterOrEqual(a, b) { return (a === b) ? "a and b are equal" : (a > b) ? "a is greater" : "b is greater"; } However, this should be used with care as using multiple conditional operators without proper indentation may make your code hard to read. For example: function findGreaterOrEqual(a, b) { return (a === b) ? "a and b are equal" : (a > b) ? "a is greater" : "b is greater"; }