What is ternary operator?
Answers
Answered by
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
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
History,
6 months ago
English,
6 months ago
Social Sciences,
1 year ago
Math,
1 year ago
Physics,
1 year ago