Hi, everyone. Swift is my first coding language and I’m running through the initial 14-day course. I’m on Lesson 10 and am having trouble getting an outcome to print in the console.
Is there something I’m doing wrong?
Any help would be much appreciated.
Chris
import SwiftUI
struct ContentView: View {
var body: some View {
VStack {
// Button instance with closure
Button("Click me", action: {
print("Hellow world")
})
// Button instance with trailing closure
Button("Click me")
{print("Hellow world")
}
}
}
struct ContentView_Previews: PreviewProvider {
static var previews: some View {
ContentView()
}
}
}