Collections keep related values together and let code read values by index.

Collections

Collections.scala
object Main {
  def main(args: Array[String]): Unit = {
    val scores = Array(82, 91, 76)
    val bonus = 
    val firstScore = scores(0)
    val adjustedScore = scores(1) + bonus

    println("first=" + firstScore)
    println("adjusted=" + adjustedScore)
  }
}
object Main {
  def main(args: Array[String]): Unit = {
    val scores = Array(82, 91, 76)
    val bonus = 
    val firstScore = scores(0)
    val adjustedScore = scores(1) + bonus

    println("first=" + firstScore)
    println("adjusted=" + adjustedScore)
  }
}
object Main {
  def main(args: Array[String]): Unit = {
    val scores = Array(82, 91, 76)
    val bonus = 
    val firstScore = scores(0)
    val adjustedScore = scores(1) + bonus

    println("first=" + firstScore)
    println("adjusted=" + adjustedScore)
  }
}
array index Array indexes start at zero, so `scores(0)` reads the first value.