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

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