When this code is executed, what will
example2 be set to?
var names = [String]() names.append("Amy") let example1 = names.removeLast() let example2 = names.removeLast()
Correct answer: This code will compile but crash.
removeLast() method returns the same data type as the array contains, which in this code is a String. As the only string in the array was already removed, the second call will throw an exception and crash.