Why does this ```if (true) 1 else if (false) { 2 }...
# getting-started
d
Why does this
Copy code
if (true) 1 else if (false) { 2 } else { 3 }.also { println("hello") }
if (true) 1 else { 3 }.also { println("world") }
print only "world" and not "hello"? first one treats whole if/else as an expression why the latter one treats only else branch as an expression?
d
Thanks!