Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SWIFT

Swift Nested Tuple

var alphabets = ("A", "B", "C", ("a", "b", "c"))

// access first element
print(alphabets.0)   // prints "A"

// access the third element
print(alphabets.3)

// access nested tuple
print(alphabets.3.0)  // prints "a"
 
PREVIOUS NEXT
Tagged: #Swift #Nested #Tuple
ADD COMMENT
Topic
Name
4+3 =