Emojis and other special characters take length 2
Explanation:
"In UTF-16 (the encoding system used for JavaScript strings) code units are 16-bit values. [..] .Not all of the code points defined by Unicode fit into 16 bits, many Unicode code points are encoded as a pair of UTF-16 code units, which is called a surrogate pair."