Arrays keep ordered values. You can read elements by position and combine them with loops or arithmetic.

Read indexed values

arrays.swift
let firstScore = 
let scores = [firstScore, 9, 6]
let first = scores[0]
let last = scores[2]
let total = first + last
print("first=\(first)")
print("total=\(total)")
let firstScore = 
let scores = [firstScore, 9, 6]
let first = scores[0]
let last = scores[2]
let total = first + last
print("first=\(first)")
print("total=\(total)")
let firstScore = 
let scores = [firstScore, 9, 6]
let first = scores[0]
let last = scores[2]
let total = first + last
print("first=\(first)")
print("total=\(total)")
array index Swift arrays are zero-indexed, so `scores[0]` is the first value.