loading...

re: What do you think about the ternary operator? VIEW POST

TOP OF THREAD FULL DISCUSSION
re: I actually like the Kotlin syntax that uses the if/else keywords instead of ?/: val max = if (a > b) a else b It's much more readable t...
 

Iirc if you surround the if/else statement in parentheses then it is valid in JavaScript as well and will assign the appropriate value to the variable

 

Can you post an example ? I only get syntax error :/

 

Totally wrong. Statement vs expression. Assignment without mutation.

code of conduct - report abuse