知道一个数组某个index对应的值 不知道下标的情况下删除该值


for (index,item) in Arr.enumerated() {
                if item == item {
                   Arr.remove(at: index)
                }
            }
更好的方法是用数组的filter尾随闭包
此文仅为鄙人学习笔记之用,朋友你来了,如有不明白或者建议又或者想给我指点一二,请私信我。liuw_flexi@163.com/QQ群:582039935. 我的gitHub: (学习代码都在gitHub) https://github.com/nwgdegitHub/
原文地址:https://www.cnblogs.com/liuw-flexi/p/7890643.html