Math, asked by Ehsanul885, 10 days ago

What is Ternary Operator?

Answers

Answered by brainly1900
0

Answer:

A ternary operator allows you to assign one value to the variable if the condition is true, and another value if the condition is false. The if else block example from above could now be written as shown in the example below. var num = 4, msg = ""; msg = (num === 4) ?

Answered by brainlyehsanul
15

Explanation :

Ternary operators deal with three operands. It is also known as the conditional assignment statement because the value assigned to a variable depends upon a logical expression.

Similar questions