I cannot figure out why I keep getting -1 for lastProductIndex when clearly the lastProductID is in the array!
var lastProductID = 6758;
var allProductIDs =
Here is why everyone hates languages that are not TYPED. I had initially set the lastProductIndex value with a value, but it was a string (because I had gotten the value from an HttpResponse object from returned JSON. So consequently I had set the variable to a string because of the returned JSON value was a string. When I hard coded the number 6758 into $.inArray it worked fine so that caught my attention.