import SwiftUI struct ContentView: View { var jokes = [Joke(setup: "Why did the chicken cross the road?", punchline: "To get to the other side!"), Joke(setup: "Why couldn't the bicycle stand up?", punchline: "It was two tired!"), Joke(setup: "Is this pool safe for diving?", punchline: "It deep ends"), Joke(setup: "Where do you learn to make ice cream?", punchline: "Sunday School"), Joke(setup: "Did you hear about the cheese factory that exploded in France?", punchline: "There was nothing left but de Brie"), Joke(setup: "Dad, can you put my shoes on?", punchline: "I dont think they'll fit me")] @State var showPunchline = false @State var currentJoke = 0 @State var isFeedbackPresented = false var body: some View { ZStack { Color(.systemBackground) if showPunchline { currentJoke += 1 showPunchline = false .onTapGesture { VStack { Text(jokes[currentJoke % jokes.count]) .padding() Button { print("Button tapped!!") showPunchline = true } label: { Text("What?") .padding() .background(Color.blue) .foregroundColor(.white) } .padding() if showPunchline { Text("jokes[currentJoke % jokes.count") .padding() Text("Tap to continue") .italic() .padding() } } } } } } }