function isInArray(arr, val) { let testStr = ',' + arr.join(",") + ","; return testStr.indexOf("," + val + ",") -1 } ...
function isInArray(arr, val) { let testStr = ',' + arr.join(",") + ","; return testStr.indexOf("," + val + ",") === -1 }
function isInArray(arr, val) { let testStr = ',' + arr.join(",") + ","; return testStr.indexOf("," + val + ",") -1 } ...
function isInArray(arr, val) { let testStr = ',' + arr.join(",") + ","; return testStr.indexOf("," + val + ",") === -1 }