Check out example codes for "create a structure swift". It will help you in understanding the concepts better.

Code Example 1

struct Example {
  // your code/variables here...
  var name = "example"
}

var example = Example() // creates a reference to the structure
print(example.name) // accesses the name variable from the structure

Learn ReactJs, React Native from akashmittal.com