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 even one lone surrogate is not well-formed, regardless of other content.
Challenge: Implement mixedSurrogateWellFormed() that returns whether 'hello\uD800world' is well-formed.
mixedSurrogateWellFormed() // β false