...

/

Better Unicode Support

Better Unicode Support

handling Unicode strings in ES5 and its alternative in ES6: using the for-of loop and spread operator to process characters

We'll cover the following...

ES5 handles string operations in two-byte chunks. As a result, handling Unicode strings with a mixture of two and four byte long codes often gets confusing. Characters of Unicode strings were often not printable on their own, and in general, any string operation required extra care.

We still calculate the length of a string by dividing the number ...