File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -110,7 +110,7 @@ s.charAt(s.length - 1) // "c"
110
110
111
111
### String.prototype.charCodeAt()
112
112
113
- ` charCodeAt ` 方法返回字符串指定位置的 Unicode 码点(十进制表示),相当于` String.fromCharCode() ` 的逆操作。
113
+ ` charCodeAt() ` 方法返回字符串指定位置的 Unicode 码点(十进制表示),相当于` String.fromCharCode() ` 的逆操作。
114
114
115
115
``` javascript
116
116
' abc' .charCodeAt (1 ) // 98
@@ -131,7 +131,7 @@ s.charAt(s.length - 1) // "c"
131
131
' abc' .charCodeAt (4 ) // NaN
132
132
```
133
133
134
- 注意,` charCodeAt ` 方法返回的 Unicode 码点不会大于65536(0xFFFF),也就是说,只返回两个字节的字符的码点。如果遇到码点大于 65536 的字符(四个字节的字符),必需连续使用两次 ` charCodeAt ` ,不仅读入` charCodeAt(i) ` ,还要读入` charCodeAt(i+1) ` ,将两个值放在一起,才能得到准确的字符。
134
+ 注意,` charCodeAt ` 方法返回的 Unicode 码点不会大于65536(0xFFFF),也就是说,只返回两个字节的字符的码点。如果遇到码点大于 65536 的字符(四个字节的字符),必须连续使用两次 ` charCodeAt ` ,不仅读入` charCodeAt(i) ` ,还要读入` charCodeAt(i+1) ` ,将两个值放在一起,才能得到准确的字符。
135
135
136
136
### String.prototype.concat()
137
137
You can’t perform that action at this time.
0 commit comments