Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

how to get last element of an array in swifg

let myArray = ["Hello!", "World!"]
let capacity = myArray.count
let lastElement = myArray[capacity-1]
print(lastElement)
 
PREVIOUS NEXT
Tagged: #element #array #swifg
ADD COMMENT
Topic
Name
5+8 =