Mathias Bynens (2013-10-18T17:30:42.000Z)
On 18 Oct 2013, at 11:05, Anne van Kesteren <annevk at annevk.nl> wrote:

> On Fri, Oct 18, 2013 at 4:58 PM, Mathias Bynens <mathias at qiwi.be> 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).
domenic at domenicdenicola.com (2013-10-24T14:22:09.945Z)
On 18 Oct 2013, at 11:05, Anne van Kesteren <annevk at annevk.nl> wrote:

> 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).