title: How can I log an ArrayIndex out of bound in JavaScript?
body: <p>I have the array <code>var john = ['asas','gggg','ggg'];</code></p>
  
  <p>If I access <code>john</code> at index 3, ie. <code>john[3]</code>, it fails.  </p>
  
  <p>How can I display a message or alert saying that there is no value at that index?</p>