Skip to content

Instantly share code, notes, and snippets.

@muratpurc
Last active August 29, 2015 14:25
Show Gist options
  • Save muratpurc/db071f480d9beea19cda to your computer and use it in GitHub Desktop.
Save muratpurc/db071f480d9beea19cda to your computer and use it in GitHub Desktop.
How to creating multi-line strings in JavaScript < ES6
// Alternative way to create a multi-line strings for ES < 6
var text = (function () {/*
<html>
<body>
<div>
</div>
</body>
</html>
*/}).toString().match(/[^]*\/\*([^]*)\*\/\}$/)[1];
console.log('text', text);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment