Values & References1 / 15
Up next

val vs var

fun main() {
    // val binds once; var can change
    val fixed = 10
    var counter = 0
    counter += fixed
    println(counter)
}
What you're solving

one binds once, the other reassigns