String.prototype.codePointAtbeginnerconst str = 'Hello'
str.codePointAt(0) // β 72
'π'.codePointAt(0) // β 128512Use codePointAt() to get the full Unicode code point at a position, correctly handling supplementary characters.
Like .at(), .codePointAt() returns undefined when the index is out of range.
Challenge: Implement isValidPos(str, pos) that returns true when str.codePointAt(pos) is not undefined.
isValidPos('hi', 0) // β true
isValidPos('hi', 5) // β false