Why that question mark for? | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
0

Why that question mark for?

i got confused when these all codes were easy and this big code comes up.

6th Sep 2018, 10:49 AM
Abhishek Shirawale
Abhishek Shirawale - avatar
1 Resposta
+ 5
You didn't post the code. But if I guess it right maybe you mean ternary operator. If the result before "?" is true it returns the value after "?" if it is false it returns the value after ":". You can read more here (JS use) https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Conditional_Operator
6th Sep 2018, 11:35 AM
TheWhĀ”teCat šŸ‡§šŸ‡¬
TheWhĀ”teCat šŸ‡§šŸ‡¬ - avatar