125
rated 0 times
[
131]
[
6]
/ answers: 1 / hits: 60486
/ 14 Years ago, fri, october 29, 2010, 12:00:00
Is it ok to do this:
var myString=Hello!;
alert(myString[0]); // shows H in an alert window
Or should it be done with either charAt(0) or substr(0,1)?
By is it ok I mean will it work on most browsers, is there a best practice recommandation that says otherwise etc.
Thank you.
More From » javascript