Count number of times a character appears in string : <p>So basically I need a script that summarizes which characters and the number of times they appear in a random string. Caps have to be ignored, for example:</p>

<pre><code>var myString = promt ("Type anything: "); //"hello Hello";
</code></pre>

<p>The end result has to be something like this: <code>h = 2, e = 2, l = 4, o = 2</code> printed in the HTML document.</p>

<p>I've tried using <code>myString.match().length</code> without much success. My main problem is defining which characters to check and not checking characters twice (for example: if there are two "h" in the string not checking them twice). </p>
