In Python, there are these triple quotation marks ('''), for multiple line strings, which is very useful. Is there any way to do this in javascript?
Asked
Active
Viewed 5,888 times
4
-
You can use the backticks instead of regular quotation mark to add multiline strings. – NoNameProvided Jul 09 '20 at 03:30
1 Answers
8
You can use the template literal. Encase your strings in backticks (`)
For your reference, check: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals

Ray Caballero
- 435
- 1
- 7
- 14
-
thanks, but i can't acept an answer just yet.. sorry it says that you can accept an answer in 4 minutes – MatthewProSkils Jul 09 '20 at 03:34
-