The ternary operator is a conditional operator that takes three operands. It is frequently used as a shortcut for the if
statement.
console.log(condition ? true : false);
Search
Aug 17, 2024, 1 min read
The ternary operator is a conditional operator that takes three operands. It is frequently used as a shortcut for the if
statement.
console.log(condition ? true : false);