De-duplication of array objects in JS
Deduplication of JS array
It is best not to use the unique method to remove the weight of the array in JS. This method mainly removes the weight of the array of dom nodes. If you remove the weight of the ordinary array elements, it will only remove the adjacent repetitive elements, that is, if there are non-adjacent repetitive elements in the array, it will not be removed, and sometimes there will be problems, so the method of deduplicating the array can be used as follows: first, traverse the array a. Create a new array object arr at the same time
For (var iTunes 0; I