Values & References2 / 16
Up next

val vs var

@main def main(): Unit =
  // val cannot be reassigned
  val fixed = 1
  // var can
  var moving = 1
  moving = 2
  println(s"$fixed $moving")
What you're solving

reassignable or not