' if ' expression doing the opposite
I was doing a lesson from Kotlin Conditionals: When and If - Dave Leeds on Kotlin
and the ‘if’ conditional is doing opposite of what i expected. Can someone please explain what’s going on here
fun main() {
var isLightbulbOn = false
val reaction =
if (isLightbulbOn) {
isLightbulbOn = false
"I just turned the light off."
} else {
isLightbulbOn = true...