difference

 

    _.difference(array,*others)

     



//example
_.difference([1,2,3,4,5],[5,2,10]);  //[1,3,4]



 

   ---------   和without类似,但是它返回的是:

 

区别比较,返回的就是在第一个数组中但不在其他数组的元素组成的数组。

 

 

   测试

 

         


 

 

 

 

 

   注释

 

  • others可以是多个数组或者字符串: