String.prototype.lengthintermediate'hello'.length // β 5
''.length // β 0
'π'.length // β 2The length property returns the number of UTF-16 code units in the string.
Emoji like π are encoded as a surrogate pair (two UTF-16 code units), so 'π'.length === 2.
Challenge: Implement emojiLength() that returns the length of the emoji 'π'.
emojiLength() // β 2