Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions concepts/template-strings/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,10 @@ lines`;
lines
*/
```

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`:

```javascript
````javascript
"This is an example of using the newline escape sequence!\nWithout backticks"

/* => This is an example of using the newline escape sequence!
Expand All @@ -58,7 +59,7 @@ const grade = 95;

`You have ${grade > 90 ? 'passed' : 'failed'} the exam.`;
// => You have passed the exam.
```
````
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lol this was wrong but I'll fix it


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