Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Multiline strings in JavaScript
* See:
This is a multiline string.
That is, a single string, spread out over many lines,
without the need to escape quotes or end-of-line
I'm not sure about browser compatibility, but it works
in nodejs and Chrome.
*/}.toString().split(/\n/).slice(1, -1).join("\n"));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment