title: how to get the value of selected index of array
body: <p>I have array in java script i want that it may give the value of that index and show to data div in html now it is showing the index of the array not value i want value i have given the jsfiddle link</p>
  
  <pre><code> &lt;div id="data"&gt;&lt;/div&gt;     
  
  
   and here is the script 
  
  
         var ad = ['a', 'b', 'c', 'a', 'd', 'e', 'a'];
          var con=document.getElementById('data');
          var inds = $.map(ad, function(v, i) {
              return v == 'b' ? i : null;
          });
  
          alert(inds); // 0,3,
          var avr1=inds;
          con.innerHTML=avr1;
  </code></pre>
  
  <p><a href="http://jsfiddle.net/2Acja/" rel="nofollow">http://jsfiddle.net/2Acja/</a></p>