Array methods applied to strings

Allen Wirfs-Brock Allen.Wirfs-Brock at
Mon May 11 10:26:03 PDT 2009

Agreed, this is a problem.

Which compatibility appendix item did you think might apply? None of them were intended to cover this situation.


>-----Original Message-----
>From: es-discuss-bounces at [mailto:es-discuss-
>bounces at] On Behalf Of James Graham
>Sent: Monday, May 11, 2009 5:16 AM
>To: es-discuss at
>Subject: Array methods applied to strings
>It seems that ES5 throws a TypeError for constructs like
>whereas current implementations (and, I think ES3, but I didn't check
>that closely) will return "c".
>Is this change intentional? There seems to be a note in the
>compatibility appendix that is about a similar, but not quite identical
>issue (or maybe it is identical and I have misunderstood). Are there
>grounds to be confident that the old behavior is not needed for web
>Apologies if I have overlooked something or misunderstood something.
>es-discuss mailing list
>es-discuss at

More information about the es-discuss mailing list