iOS Swift - Lists and Data Display
What will this SwiftUI view display when the
tasks array is empty?
var body: some View {
if tasks.isEmpty {
Text("No tasks available")
} else {
List(tasks, id: \.self) { task in
Text(task)
}
}
}