A Tuple in Swift is a neat way to store multiple values in a single value. You will probably come across tuples in a return function or class. So a tuple is basically a way to represent a collection of values that are closely linked to each other. So here is an example of a Tuple in Swift: 1var player = (“Mark”, 999, true) The ( ) lets Swift know that you are creating a Tuple. So you would add ...
↧