Possible Duplicate:
Javascript heredoc
I am trying to figure out the equivalent of the "here printing" from Perl (<<) for Javascript, but I don't seem to find the answer.
Possible Duplicate:
Javascript heredoc
I am trying to figure out the equivalent of the "here printing" from Perl (<<) for Javascript, but I don't seem to find the answer.
There seems to be a bit of a clumsy way of doing it in later JavaScript versions. I snagged this from a blog entry.
var string = (<r><![CDATA[
     The text string goes here.  Since this is a XML CDATA section,
     stuff like <> work fine too, even if definitely invalid XML.
  ]]></r>).toString();
