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
It's been 10 years yet no answer mentioned RegExp.
RegExp
var x = 'somestring'; console.log(x.match(/./)[0]);