I'm trying to search for a keycode in an array with array.indexOf(string); method but even though the keycode I am searching for is declared in the array it couldn't find it and returns -1 where am I mistaken?
PS: However when I try to declare the string I'm trying the search manually (like var string = "219") it does work.
PS-2: As you can see in the console I'm logging the variable tusASII to ensure variable does have the right value to search for
var tusASII = event.keyCode;
var trkarakterler = ["219","221","186","73","191","220"];
console.log(tusASII);
console.log(trkarakterler.indexOf(tusASII));
keyCodeis not a string, it's a number.