• 1 使用array unique方法进行去重 对数组元素进行去重 我们一般会使用array unique方法 使用这个方法可以把数组中的元素去重 1 2 3 4 5 6 1 2 3 4 5 6 输出 Array 0 gt 1 1 gt 2