Function check number return to image in javascript
<p>How to create function replace number to image?
Example: <code>var dd="123"</code>
I want to create function replace value of <code>dd</code> to <code>image</code>.</p>

<pre><code>if 1=image1
if 2=image2
if 3=image3
</code></pre>

<p>How to do that? Please provide coding.</p>
