Created
June 8, 2023 11:26
-
-
Save kalaiselvan369/0c198d2a1702069912653377672f2262 to your computer and use it in GitHub Desktop.
Statement producing side effect
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fun main() { | |
var j = false | |
for (i in 1..112) { | |
if (i == 10) { | |
println(true) | |
j = true // side effect | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment