Skip to content

Instantly share code, notes, and snippets.

@kalaiselvan369
Created June 8, 2023 11:26
Show Gist options
  • Save kalaiselvan369/0c198d2a1702069912653377672f2262 to your computer and use it in GitHub Desktop.
Save kalaiselvan369/0c198d2a1702069912653377672f2262 to your computer and use it in GitHub Desktop.
Statement producing side effect
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