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);