Computer Science, asked by kvishwanathan051, 16 days ago

Explain Ternary Operators with examples.​

Answers

Answered by XxHotBadBoyxX
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 XxitsmrseenuxX
1

Answer:

\huge\color{pink}\boxed{\colorbox{Black}{❥ 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