js查找两个数组中相同的项 filter

array1.filter(function(n) {
    return array2.indexOf(n) != -1
});
posted @ 2015-06-24 11:38  way~  阅读(16069)  评论(3)    收藏  举报