mirror of
https://github.com/ruanyf/es6tutorial.git
synced 2024-04-21 12:32:22 +00:00
docs(let): 修正函数默认参数的死区问题
This commit is contained in:
+2
-2
@@ -98,8 +98,8 @@ var s = '𠮷a';
|
||||
for (let ch of s) {
|
||||
console.log(ch.codePointAt(0).toString(16));
|
||||
}
|
||||
// "20bb7"
|
||||
// ""
|
||||
// 20bb7
|
||||
// 61
|
||||
```
|
||||
|
||||
`codePointAt`方法是测试一个字符由两个字节还是由四个字节组成的最简单方法。
|
||||
|
||||
Reference in New Issue
Block a user