Compare arrays with jQuery [duplicate]
问题 This question already has answers here : Closed 8 years ago . Possible Duplicates: Simplest code for array intersection in javascript How to merge two arrays in Javascript There are three arrays: var items = Array(523,3452,334,31,5346); var items_used = Array(3452,31,4123); var items_new = Array(); First one is general, second is the items currenly in use. Third one includes all the items from the first array, witch are not mentioned in second. How do I remove from the first array items,