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 1,380 times
0
-
You can use the backticks instead of regular quotation mark to add multiline strings. – NoNameProvided Jul 09 '20 at 03:30
1 Answers
3
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
- 370
- 1
- 6
- 13
-
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
-