Check whether an array element is undefined or not in jQuery

This will help you to check whether an array element is undefined or not in jquery
  1.  if (typeof localHeaderColumnArray[0] != 'undefined' ) {  
  2.                            
  3.   }  
  4.  else {  
  5.   }  
  6.   
  7. Here localHeaderColumnArray is my local array