check enumatted arrray last item swift

183

    for (idx, element) in array.enumerated() {
      if idx == array.endIndex-1 {
        // handling the last element
       }
     }

Comments

Submit
0 Comments