On 18 Oct 2013, at 11:05, Anne van Kesteren <[email protected]> wrote:

> On Fri, Oct 18, 2013 at 4:58 PM, Mathias Bynens <[email protected]> wrote:
>> I disagree. In those situations you should just iterate over the string 
>> using `for…of`.
> 
> That seems to iterate over code units as far as I can tell.
> 
> for (var x of "đź’©")
>  print(x.charCodeAt(0))
> 
> invokes print() twice in Gecko.

Woah, that doesn’t seem very useful. Is that a bug, or the way it’s supposed to 
work? I thought it was supposed to only iterate over whole code points (i.e. 
only print once for each code point, not once for each surrogate half).
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to