js求数组差集

underscore.js求数组差集

var storeArr=[1,2,3,4,5];
var excludeStoreArr=[2,3];

var nextArr = _.difference(storeArr, excludeStoreArr);

console.log(nextArr)  --输出结果 [1,4,5]

此随笔或为自己所写、或为转载于网络。仅用于个人收集及备忘。

原文地址:https://www.cnblogs.com/shy1766IT/p/13366854.html