Answers for "find and get index in swift array"

1

How to find index of list item in Swift?

let arr = ["a","b","c","a"]

let indexOfA = arr.firstIndex(of: "a") // 0
let indexOfB = arr.lastIndex(of: "a") // 3
Posted by: Guest on January-30-2020
0

get index from array swift

addd
Posted by: Guest on June-03-2021

Code answers related to "find and get index in swift array"

Code answers related to "Swift"

Browse Popular Code Answers by Language