Skip to content

Commit 1eed40b

Browse files
Fix incorrect code fence in introduction.md (#2777)
* Fix incorrect code fence in introduction.md * [CI] Format code --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 parent 7310ff6 commit 1eed40b

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

concepts/template-strings/introduction.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,13 @@ lines`;
4141

4242
If you want to represent a newline inside a regular string instead of using a template string (ie. not using backticks), you can use the newline escape sequence `\n`:
4343

44-
````javascript
45-
"This is an example of using the newline escape sequence!\nWithout backticks"
44+
```javascript
45+
'This is an example of using the newline escape sequence!\nWithout backticks';
4646

4747
/* => This is an example of using the newline escape sequence!
4848
Without backticks
4949
*/
50+
```
5051

5152
With the available substitution capabilities, you can also introduce logic into the process to determine what the output string should be.
5253
One way to handle the logic could be using the [ternary operator][ternary-operator].
@@ -59,7 +60,7 @@ const grade = 95;
5960

6061
`You have ${grade > 90 ? 'passed' : 'failed'} the exam.`;
6162
// => You have passed the exam.
62-
````
63+
```
6364

6465
[string-reference]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String
6566
[type-conversion-concept]: /tracks/javascript/concepts/type-conversion

0 commit comments

Comments
 (0)