1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 // Returns the intersection of the arrays |a| and |b|, which do not have to be
7 function intersect(a
, b
) {
9 for (var i
= 0; i
< a
.length
; i
++) {
10 if (b
.indexOf(a
[i
]) >= 0)
16 exports
.intersect
= intersect
;