Skip to content

Commit 73b38cc

Browse files
committed
docs: clarify charCodeAt edge case behavior in first line
Moves NaN edge-case behavior to the first-line description following the pattern established in PR #60569 for indexOf/lastIndexOf.
1 parent 7b8cb3b commit 73b38cc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/lib/es5.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -400,8 +400,8 @@ interface String {
400400
charAt(pos: number): string;
401401

402402
/**
403-
* Returns the Unicode value of the character at the specified location.
404-
* @param index The zero-based index of the desired character. If there is no character at the specified index, NaN is returned.
403+
* Returns the Unicode value of the character at the specified location, or NaN if the index is out of bounds.
404+
* @param index The zero-based index of the desired character.
405405
*/
406406
charCodeAt(index: number): number;
407407

0 commit comments

Comments
 (0)