Answer the question
In order to leave comments, you need to log in
How to check an element in an array for 'undefined'?
I understand the question is funny, but when I check an element in an array for "undefined": I get an error something like "Cannot read property '-1' of undefined" when j = i = -1. That's how I can check the existence of an index in an array. if (typeof array[j][i] == 'undefined')
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question