I am new to Swift, and I have been following a tutorial on Creating a Card View. In Section 2, step 3, it directs the user to add an extension to the DailyScrum struct:
struct DailyScrum {
var title: String
var attendees: [String]
var lengthInMinutes: Int
var theme: Theme
}
extension DailyScrum {
static let sampleData: [DailyScrum] =
[
DailyScrum(...),
DailyScrum(...),
DailyScrum(...)
]
}
From my understanding, the constant sampleData is a stored type property, yet I read that extensions can only add computed type properties. Can someone help me understand what sampleData is, and why it can be used in an extension?