Accessing individual characters with array notation ES3 code generation.

Topics: Language Specification
Jun 8, 2014 at 7:07 PM
Will it be possible to for a Type Script code like this?
function firstToUpper(text) {
// undefined on ES3, IE7 and below
    var first = text[0]; // undefined
    return first.toUpperCase() + text.substring(1).toLowerCase();
}
firstToUpper("test");
To something like this for ES3?
function firstToUpper(text) {
    var first = text.charAt(0);
    return first.toUpperCase() + text.substring(1).toLowerCase();
}
firstToUpper("test");