1.

Write code for maths.abs(x) using a) if else statement b) ternary operator

Answer»

In computer programming, ?: is a ternary OPERATOR that is part of the SYNTAX for basic CONDITIONAL EXPRESSIONS in several programming languages. It is commonly referred to as the conditional operator, inline if ( if ), or ternary if. An expression a ? b : c evaluates to b if the value of a is true, and otherwise to c .



Discussion

No Comment Found