Javascript strings - getting the char at a certain point

I have a variable:

var text = "hello";

I want to get the 0 positioned character, so:

var firstChar = text[0];

Simple. In firefox and chrome this works. In IE however i always get back 'undefined'

Any ideas why this might be happening in IE?

9
задан Garis M Suero 8 September 2010 в 14:27
поделиться