Is there a way to compare 2 arrays and return a new array indicating which values matched?
For example
a = ['Africa', 'America', 'Europe']
b = ['Africa', 'Asia', 'Europe']
// need
// c = [true, false, true]
EDIT: So far I have
function mask(arr1, arr2) {
var arr = [];
for (var i = 0; i < arr1.length; i++) {
arr.push(arr1[i] === arr2[i]);
}
return arr;
}