From 8430a5d7040011906ae9a467fc9aa2ca5ff531ab Mon Sep 17 00:00:00 2001 From: ruanyf Date: Sat, 22 Nov 2014 21:55:29 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9sting/u-modifier?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/string.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/string.md b/docs/string.md index 2171593..0f8f369 100644 --- a/docs/string.md +++ b/docs/string.md @@ -91,7 +91,7 @@ ES6对正则表达式添加了u修饰符,用来正确处理大于\uFFFF的Unic ```javascript -大于\uFFFF的Unicode字符var s = "𠮷"; +var s = "𠮷"; /^.$/.test(s) // false /^.$/u.test(s) // true @@ -293,7 +293,7 @@ console.log(`${ x } + ${ y } = ${ x + y}`) 上面代码表示,在模板字符串中嵌入变量,需要将变量名写在${}之中。 模板字符串使得字符串与变量的结合,变得容易。下面是一个例子。 -This article explains the effects of the u flag. It helps if you’ve read JavaScript has a Unicode problem first. + ```javascript if (x > MAX) {