Re:Multiline strings in JavaScript
by gravity13 on Saturday July 12, 2014 @07:16AM
(#8024266)
You can also
I find it's better than string concat because the trailing \ is just one annoying thing rather than three.
[ Parent
| on HN ]
Re:Multiline strings in JavaScript
by jaredmcateer on Saturday July 12, 2014 @11:41AM
(#8024820)
6 months later:
var str = ' \
<!doctype html> \
<html> \
<body> \
<h1>❤ unicorns</h1> \
</body> \
</html> \
'
Help I'm maintaining your code and I get a syntax error
Re:Multiline strings in JavaScript
by jasonkostempski on Saturday July 12, 2014 @01:29PM
(#8025160)
HA! I (don't) see what you did there :)
There is a space following one of the slashes.