jskatas.org Continuously Learn JavaScript. Your Way.

Template strings: multiline

Template strings, can be multiline.

Donate to NGO Julenka. Support Ukranians in need. Julenka is an NGO which my brother founded in 2011 to support Ukranian families and kids in need.

Template string, can contain multiline content

  • wrap it in backticks (`) and add a newline, to span across two lines
  • even over more than two lines

and expressions inside work too

  • like simple variables
  • also here spaces matter

Links

Description of multiline template strings.