[Javascript] String on multiple lines

Peter Lauri lists at dwsasia.com
Wed Jun 21 06:40:45 CDT 2006


Thanks. I did know that problem before. But I was curious if JS could catch
multiple lines like PHP can, but now I know it can not.

Thanks.

-----Original Message-----
From: javascript-bounces at LaTech.edu [mailto:javascript-bounces at LaTech.edu]
On Behalf Of Scott Reynen
Sent: Wednesday, June 21, 2006 11:16 PM
To: [JavaScript List]
Subject: Re: [Javascript] String on multiple lines

On Jun 21, 2006, at 12:13 AM, Peter Lauri wrote:

>> I'd try escaping the PHP line break

> This did it, but with PHP :)
>
> No Javascript solution?

Here's my understanding of why you can't do this: a JavaScript  
runtime does two things to code.  First, it parses it.  Then, it  
executes it.  Line breaks indicate the end of a line of code in  
JavaScript, and a line of code can't end with a string open, so the  
parsing fails.  So you can't solve this problem with JavaScript code,  
because JavaScript never gets to the step of executing the code.

Peace,
Scott

_______________________________________________
Javascript mailing list
Javascript at LaTech.edu
https://lists.LaTech.edu/mailman/listinfo/javascript




More information about the Javascript mailing list