Skip to content

Instantly share code, notes, and snippets.

@artturijalli
Created January 17, 2022 13:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save artturijalli/104dc69818698d17ca376a44d6d57728 to your computer and use it in GitHub Desktop.
Save artturijalli/104dc69818698d17ca376a44d6d57728 to your computer and use it in GitHub Desktop.
struct Fruit {
let name: String
let color: String
init(name: String, color: String) {
self.name = name
self.color = color
}
}
var banana = Fruit(name: "Banana", color: "Yellow")
print(banana.name, banana.color)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment