Loading... 编写一个方法去掉数组里面 重复的内容 ----------------------------------- ```javascript var arr = [1, 2, 3, 4, 5, 1, 2, 3] for (var i = 0; i < arr.length; i++) { for (var j = i + 1; j < arr.length; j++) { if (arr[i] == arr[j]) { const data = arr.splice(j, 1) } } } ``` Last modification:September 4, 2023 © Allow specification reprint Support Appreciate the author AliPayWeChat Like 如果觉得我的文章对你有用,请随意赞赏