Q:

How to check an array contains any item of another array

I have two arrays 
var master= ["1","2","3"];
var arr = ["1","5"];

i wanted to check if arr contains any item from master. Based on SO post here i have the following code which only works with chrome
var found = arr.some(r => master.indexOf(r) >= 0);

however it does not work with IE11. IE11 throws error

JavaScript critical error at line 23, column 44 in
  https://localhost:44328/js/xxxx.js\n\nSCRIPT1002: Syntax error

I have also tried
 var found = arr.some(r => master.includes(r) >= 0);

A:

You need to take a classic function, because IE 11 has only ES5, that means no arrow functions nor Array#includes.

var master= ["1", "2", "3"],
    arr = ["1", "5"],
    found = arr.some(function (r) { return master.indexOf(r) >= 0; });

console.log(found);

