Message from JavaScript discussions

February 2019

β€” Obsolete though, template strings solve the problem now

β€” 

I tried it on git-draw2, and it didnt work well. i had to escape all \n. also the syntax is not hereDoc syntax

β€” 1. No, you don't have to escape newlines with template strings
2. This syntax isn't heredoc either

β€” If it's not heredoc - i dont need it. let those purists swim in their aquarium aloneπŸ˜…i see a tendency of them to kiss any react hand they see, so they "invent" something.. template string, huh

Message permanent page

β€” a = `var a = 'some
string'`;

β€” This is a valid template string

β€” But the source within it won't be valid

β€” But invalid JS code

β€” So template string still holds up

β€” a = `var a = \`some
string\``;

β€” Solved

β€” I don want to modify the original, i just want to copy-paste it