TypeScript Array 数组 两个数组取交集
//取交集 private ArrayIntersection(a, b) { var ai=0, bi=0; var result = new Array(); while( ai < a.length && bi < b.length ) { if (a[ai] < b[bi] ){ ai++;} else if (a[ai] > b[bi] ){bi++;} else { result.push(a[ai]); ai++; bi++; } } return result; } 标签:TypeScript,ai,bi,++,数组,交集,Array From: https://www.cnblogs.com/congcongerhuo/p/16725889.html