0
How to solve turnury? operators
4 ответов
+ 6
(condition) ? (do this if true) : (else do this if false);
^Basically, it's just simplifying your if/else block. Not appropriate for all situations, but for simple situations, it's nice to have around.
Example:
myResult = (myVar > 5) ? "myVar is greater than 5!" : "myVar is lesser than 5...";
+ 2
Hi Deepak
I think you mean Ternary (as in third) which is often referred to as the conditional operator. This can be used to replace if then else statements
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Conditional_Operator
0
Bro phir wo 12:20:50 ya ratio ma kya rhta ha
0
Mike but my question is different