I have a JavaScript array with some empty (maybe null or undefined) elements. I need to find those empty indexes (1 and 3). But my solution is not working: Snippet: Answer Use a blank string to compare to get the answer you desire. If you also want to check for undefined you can use logical or to check both of