+ 1
What is this operator (?)?
Plz tell me about the operator in this program. https://code.sololearn.com/cI7gVNrRhdZE/?ref=app
2 Respostas
+ 5
Hi Mukul
It is called a ternary operator
It's basically the same as an if:
(condition) ? True statements : false statements
The difference between this and the if statement is that you use it to assign the result directly to a variable
Hope it helps you
+ 2
Ok thank you Guillem Padilla