# arrayUnique 方法

接口 function arrayIntersection(a: Array<any>, b: Array<any>): any[];

版本 1.1.8

# 作用:获取两个数组的交集

// 引入
import { arrayIntersection } from 'project-libs';

// 单独引入
import arrayIntersection from 'project-libs/build/array/arrayIntersection';

# 参数

参数 类型 是否必须 含义
a array 数组
b array 数组

# 返回值

是否有返回值 类型 说明
array 返回一个新的数组

# 小例子

// 使用
const a = [1,2];
const b = [1,3];
const newArr = arrayIntersection(a, b);

// 结果: [1]