What's the difference between .substr(0,1) or .charAt(0)?

Viewed 13259

We were wondering in this thread if there was a real difference between the use of .substr(0,1) and the use of .charAt(0) when you want to get the first character (actually, it could apply to any case where you wan only one char).

Is any of each faster than the other?

2 Answers
Related