Swift 5
-

Swift enumerated(): Loop With Index and Element Together
Use enumerated() to loop over a Swift array with both index and element, build arrays of pairs, and avoid the offset-vs-index trap…
-

How to Find the Index of an Item in a Swift Array
Find an item’s index in a Swift array with firstIndex(of:), lastIndex, and identity checks for classes. Fix the old find/indexOf errors and…