Results 1 to 3 of 3

Thread: heredoc strings in javascript

  1. #1
    Join Date
    Apr 2009
    Posts
    32

    heredoc strings in javascript

    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?

  2. #2
    Join Date
    May 2008
    Posts
    2,297

    Re: heredoc strings in javascript

    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; \
    }';

  3. #3
    Join Date
    Jan 2009
    Posts
    199

    Re: heredoc strings in javascript

    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.

Similar Threads

  1. Difference between two strings
    By Aman 1 in forum Software Development
    Replies: 5
    Last Post: 03-12-2013, 11:59 AM
  2. Files and strings in C
    By An1990 in forum Software Development
    Replies: 2
    Last Post: 10-05-2012, 10:11 PM
  3. How to use Strings in Python
    By Edmund-Windows in forum Software Development
    Replies: 5
    Last Post: 31-12-2010, 06:25 AM
  4. How to Compare Two Strings in C
    By Pratim in forum Software Development
    Replies: 3
    Last Post: 28-12-2009, 11:10 AM
  5. Array of Strings in C++
    By Jaden in forum Software Development
    Replies: 3
    Last Post: 25-10-2008, 02:18 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,714,140,729.49973 seconds with 16 queries