diff options
author | CC2m2 <61456600+CC2m2@users.noreply.github.com> | 2021-08-30 19:15:59 +0800 |
---|---|---|
committer | Irvin <irvinfly@gmail.com> | 2021-09-04 12:23:03 +0800 |
commit | 9ceaac7aeac286b2795f31fbd1cd3d03258aad7c (patch) | |
tree | ec0daee5fd9c2eae61bb4786017d492e2f05d4cb /files/zh-cn/web/javascript/reference | |
parent | 66840d0d568dc664f9f7c8228c20d90c7566ab2d (diff) | |
download | translated-content-9ceaac7aeac286b2795f31fbd1cd3d03258aad7c.tar.gz translated-content-9ceaac7aeac286b2795f31fbd1cd3d03258aad7c.tar.bz2 translated-content-9ceaac7aeac286b2795f31fbd1cd3d03258aad7c.zip |
Update index.html
Diffstat (limited to 'files/zh-cn/web/javascript/reference')
-rw-r--r-- | files/zh-cn/web/javascript/reference/global_objects/string/raw/index.html | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/files/zh-cn/web/javascript/reference/global_objects/string/raw/index.html b/files/zh-cn/web/javascript/reference/global_objects/string/raw/index.html index 8ff8794000..989a78f2c6 100644 --- a/files/zh-cn/web/javascript/reference/global_objects/string/raw/index.html +++ b/files/zh-cn/web/javascript/reference/global_objects/string/raw/index.html @@ -55,10 +55,10 @@ String.raw`templateString` <h3 id="使用_String.raw">使用 <code>String.raw()</code></h3> <pre class="brush: js">String.raw`Hi\n${2+3}!`; -// 'Hi\n5!',Hi 后面的字符不是换行符,\ 和 n 是两个不同的字符 +// 'Hi\\n5!',Hi 后面的字符不是换行符,\ 和 n 是两个不同的字符 String.raw `Hi\u000A!`; -// "Hi\u000A!",同上,这里得到的会是 \、u、0、0、0、A 6个字符, +// "Hi\\u000A!",同上,这里得到的会是 \、u、0、0、0、A 6个字符, // 任何类型的转义形式都会失效,保留原样输出,不信你试试.length let name = "Bob"; |