title: Check if an array item is set in JS
body: <p>I've got an array</p>
  
  <pre><code>    var assoc_pagine = new Array();
      assoc_pagine["home"]=0;
      assoc_pagine["about"]=1;
      assoc_pagine["work"]=2;
  </code></pre>
  
  <p>I tried </p>
  
  <pre><code>    if (assoc_pagine[var] != "undefined") {
  </code></pre>
  
  <p>but it doesn't seem to work</p>
  
  <p>I'm using jquery, I don't know if it can help</p>
  
  <p>Thanks</p>