I watched Stanford 193p, and I had a question.
When the professor writes the code, he writes like this
struct GameView: View {
var body: some View {
gameBody
}
var gameBody: some View {
Button("gameBody") {
gameBodyFunc()
}
}
private func gameBodyFunc() {
}
}
Why is the function declared private but not the gameBody variable?
I am impressed with his coding style and want to learn it.