Computer Science, asked by oishy458, 10 months ago

What is ternary operator?

Answers

Answered by Blaezii
13

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 code.

Answered by Anonymous
4

In mathematics, a ternary operation is an n-ary operation with n = 3. A ternary operation on a set A takes any given three elements of A and combines them to form a single element of A. In computer science, a ternary operator is an operator that takes three arguments

Similar questions