I have a string, and I need to get its first character.
var x = \'somestring\'; alert(x[0]); //in ie7 returns undefined
How can I fix my co
var str="stack overflow"; firstChar = str.charAt(0); secondChar = str.charAt(1);
Tested in IE6+, FF, Chrome, safari.