Is that possible to use a heredoc type string syntax in javascript. I'm trying to create a variable where returns, multiple values. Is there a way to include multiple values in javascript with a heredoc structure like in Perl/PHP?
Is that possible to use a heredoc type string syntax in javascript. I'm trying to create a variable where returns, multiple values. Is there a way to include multiple values in javascript with a heredoc structure like in Perl/PHP?
To Breaking up the string you need to put in a backslash....
var style = ' .calendar { \
font-size:10px; \
font-family:bitstream, verdana, boldl; \
background-color:blue; \
width:186px; \
}';
A third way to delimit strings is the heredoc syntax: <<<. A here document (also called a here-document, a heredoc, or a here-string) is a way of specifying a string literal in command line shells such as Bash, Windows PowerShell and the Bourne Shell, as well as programming languages such as Perl, PHP, Python and Ruby.After <<< operator, an identifier is provided, then a newline. The string itself follows, and then the same identifier again to close the quotation.
Bookmarks