Feature - the heredoc doesn't begin until the next line (multi-LINE string.)  
This makes the JS code visually clearer.

-- Jim

On Feb 22, 2015, at 7:12 AM, Anthony Vanelverdinghe 
<[email protected]> wrote:

> Hi
> 
> When using a here document, statements that are on the same line as the 
> initial <<EOD are interpreted as JavaScript & executed after the "heredoc 
> statement". Is this a bug or a feature?
> 
> For example:
> 
> var a = 2;
> print(<<EOD); a = 3; print("here")
> a++;
> ${a}
> EOD
> print(a);
> 
> prints
> 
> a++;
> 2
> here
> 3
> 
> Kind regards, Anthony

Reply via email to