Double the occurence of character in Javascript
<p>Input String : abcd </p>

<p>Output String : aabbccdd </p>

<p>How to achieve this using Javascript if 'a' 'b' 'c' 'd' are an elements of an array ..</p>
