Skip to content

Commit 95d62ea

Browse files
committed
docs(string-methods): refact String.raw()
1 parent 5a773c8 commit 95d62ea

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

docs/string-methods.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ String.raw`Hi\u000A!`;
4343
```javascript
4444
String.raw`Hi\\n`
4545
// 返回 "Hi\\\\n"
46+
47+
String.raw`Hi\\n` === "Hi\\\\n" // true
4648
```
4749

4850
`String.raw()`方法可以作为处理模板字符串的基本方法,它会将所有变量替换,而且对斜杠进行转义,方便下一步作为字符串来使用。

0 commit comments

Comments
 (0)