>/ 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.
SpiderMonkey does not implement the (yet to be) spec'ed
String.prototype.@@iterator function, instead it simply aliases
String.prototype["@@iterator"] to Array.prototype["@@iterator"]:
js> String.prototype["@@iterator"] === Array.prototype["@@iterator"]
true
- André
_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss