Display first letter of image name in javascript
<p>I am displaying a random image from a list in a table. I want to display the first letter of the random image's name within the cell along with the image. can someone help me with that.</p>

<pre><code>&lt;html&gt;
&lt;head&gt;
&lt;script language=Javascript&gt;

 imagelist = ["man.gif","wolf.gif", "wall.gif"]

function ranImage() {


whichImage = Math.floor(Math.random()*imagelist.length);

document.write('&lt;IMG SRC="' +imagelist[whichImage]+ '"&gt;');

 imagelist.splice(whichImage,1);


 }


&lt;/script&gt;
&lt;/head&gt;
&lt;body&gt;
 &lt;table id="newtable"/&gt;

 &lt;tr&gt;

 &lt;td&gt;


    &lt;script language="Javascript"&gt; ranImage();&lt;/script&gt;

   &lt;/td&gt;
     &lt;td&gt;

     &lt;script language="Javascript"&gt;ranImage();&lt;/script&gt;

     &lt;/td&gt;
     &lt;/tr&gt;
     &lt;/table&gt;
       &lt;/body&gt;
      &lt;/html&gt;
</code></pre>
