Question 1/12: This code is valid Swift – true or false?
Hint: When you create an instance of a struct, Swift will ask you to provide values for all its properties. These parameters must have the same names as the properties themselves, and must be in the same order they were defined.Click to show.
struct Order {
var customerID: Int
var itemID: Int
}
let order = Order(customer: 143, item: 556)
Correct! The first property is named customerID rather than customer, and the second property is named itemID, not item.
Oops – that's not correct. The first property is named customerID rather than customer, and the second property is named itemID, not item.