let array = [1,2,3,4,5,6,7,8,9]
let maxNum = 5
var iterationNumber = 0
var firstNumbers = [Int()]
if array.count > maxNum{
for i in array{
iterationNumber += 1
if iterationNumber <= maxNum{
firstNumbers.append(i)
}
}
firstNumbers.remove(at: 0)
print(firstNumbers)
} else {
print("There were not \(maxNum) items in the array.")
}