title: Can't make random div visible
body: <p>I have a array named compliments with my IDs in it, and I try to make a random ID visible but it won't work</p>
  
  <pre><code>var compliments=new Array()
  
  compliments[0]="divid"
  
  compliments[1]="divid2"
  
  compliments[2]="divid"
  
  compliments[3]="divid2"
  
  compliments[4]="divid"
  
  compliments[5]="divid2"
  
  compliments[6]="divid" 
  document.getElementById(compliments[Math.round(Math.random()*compliments.length-1)).style.visibility ="visible";
  </code></pre>