The fastest method in Javascript to find if an array contains a value is this:
function existsInArrayForIgnoreDataType(arr, targetElem) { for (let i = 0; i < arr.length; i++) { if (arr[i] == targetElem) return true } return false }
You can find the complete study I did here.