We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a5bd153 commit 04464c5Copy full SHA for 04464c5
concepts/template-strings/introduction.md
@@ -32,6 +32,19 @@ When you are needing to have strings formatted on multiple lines:
32
`This is an example of using template
33
strings to accomplish multiple
34
lines`;
35
+
36
+/* => This is an example of using template
37
+ strings to accomplish multiple
38
+ lines
39
+*/
40
+```
41
+If you want to represent a newline inside a single-line string (not using backticks), you can use the newline escape sequence `\n`:
42
+```javascript
43
+"Congratulations Hannah!\nClass of 2022"
44
45
+/* => Congratulations Hannah!
46
+ Class of 2022
47
48
```
49
50
With the available substitution capabilities, you can also introduce logic into the process to determine what the output string should be.
0 commit comments