How to get first character of string?
<p>I have a string, and I need to get its first character.</p>

<pre><code>var x = 'somestring'
alert(x[0]); //in ie7 returns undefined
</code></pre>

<p>How can I fix my code?</p>
