From 3aed4ae0fbee54534bd15c4174f2d22a4fb27bb6 Mon Sep 17 00:00:00 2001 From: Jacty Date: Thu, 13 Apr 2017 02:58:57 +0800 Subject: [PATCH] typo mistake typo mistake --- docs/string.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/string.md b/docs/string.md index 735c5a1..0bb4c7f 100644 --- a/docs/string.md +++ b/docs/string.md @@ -124,7 +124,7 @@ String.fromCharCode(0x20BB7) 上面代码中,`String.fromCharCode`不能识别大于`0xFFFF`的码点,所以`0x20BB7`就发生了溢出,最高位`2`被舍弃了,最后返回码点`U+0BB7`对应的字符,而不是码点`U+20BB7`对应的字符。 -ES6提供了`String.fromCodePoint`方法,可以识别`0xFFFF`的字符,弥补了`String.fromCharCode`方法的不足。在作用上,正好与`codePointAt`方法相反。 +ES6提供了`String.fromCodePoint`方法,可以识别大于`0xFFFF`的字符,弥补了`String.fromCharCode`方法的不足。在作用上,正好与`codePointAt`方法相反。 ```javascript String.fromCodePoint(0x20BB7)