dynamically generate an array of previous years in swift code example Example: swift create array from range let arr2 = Array(0...4)