adspace


What is tuple? How to create a tuple in swift?

Answer Posted / Gautam Kumar Seth

A tuple is a data structure that groups multiple values of different types into a single compound value. Tuple in Swift can be created by simply separating the items with commas, for example: let myTuple = (1, "hello", true). To access individual elements, use their position like: myTuple.0, myTuple.1, myTuple.2.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How can you define a base class in swift?

926


Explain the common execution states for a swift ios app (ios application lifecycle).

896


Explain some biggest changes in usernotifications.

925