What is the use and syntax of a ternary operator?
45 Likes
Ternary operator is used to check if a condition is true and false. Depending on whether the condition tests true or false, expression 1 or expression 2 is evaluated. Its syntax is:
boolean-expression ? expression1 : expression2;
Answered By
28 Likes
Explain the shorthand assignment operator with an example.
What is the purpose of the new operator?
State the difference between = and ==.
If a = 5, b = 9, calculate the value of: a += a++ - ++b + a