Explain Ternary Operators with examples.
Answers
Answered by
2
Answer:
The ternary operator is an operator that exists in some programming languages, which takes three operands rather than the typical one or two that most operators use. It provides a way to shorten a simple if else block. For example, consider the below JavaScript co.de. var num = 4, ms.g = ""; if (num === 4) {
Answered by
1
Answer:
The ternary operator is an operator that exists in some programming languages, which takes three operands rather than the typical one or two that most operators use. It provides a way to shorten a simple if else block. For example, consider the below Ja_vaScript co_de.
Similar questions