test262/harness/arrayContains.js

18 lines
393 B
JavaScript
Raw Normal View History

//-----------------------------------------------------------------------------
function arrayContains(arr, expected) {
var found;
for (var i = 0; i < expected.length; i++) {
found = false;
for (var j = 0; j < arr.length; j++) {
if (expected[i] === arr[j]) {
found = true;
break;
}
}
if (!found) {
return false;
}
}
return true;
}