String.prototype.isWellFormedintermediate'hello'.isWellFormed() // β true
'π'.isWellFormed() // β true
'οΏ½'.isWellFormed() // β falseUse isWellFormed() to check if a string contains no lone surrogate code units (ES2024).
A string containing a lone high surrogate (\uD800) is not well-formed.
Challenge: Implement hasLoneSurrogate() that returns true when the string '\uD800' is NOT well-formed.
hasLoneSurrogate() // β true (it is NOT well-formed)