0
Don't understand. ternary operator
Please give me some example
2 Réponses
+ 3
conditional (ternary) operator is the only JavaScript operator that takes three operands. This operator is frequently used as a shortcut for the if statement.
Syntax
condition ? expr1 : expr2
Parameters
condition (or conditions)An expression that evaluates to true or false. expr1, expr2 Expressions with values of any type.
Description
If condition is true, the operator returns the value of expr1; otherwise, it returns the value of expr2
+ 2
what language ?