Search code examples
javascriptquotation-marks

Triple Quotation Marks in Javascript


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?


Solution

  • 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