🌈 搜索
📅  最后修改于: 2022-03-11 15:00:58.579000             🧑  作者: Mango
let arr = ["a","b","c","a"] let indexOfA = arr.firstIndex(of: "a") // 0 let indexOfB = arr.lastIndex(of: "a") // 3