So I've got an array in javascript and want to see if a value exists in it... though it's returning false even though 120 does exist in the array. I've written my own method to handle this in the meantime though just wanted to see if anyone else can see what I'm doing wrong here?
var myArray = [120, 121, 222];
if (jQuery.inArray(120, myArray)) {
alert("in my array");
} else {
alert("not in array");
}
jsFiddle - http://jsfiddle.net/453ebncs/