The newline escape sequence \n can be placed in string literals if you want to break the output text over more than one line.
Do not use a line terminator even with a backslash to escape it. In other words, don't think that placing a backslash as the last character of a line will hide the line terminator. While that may work in other languages, it won't work in JavaScript.
See also: | Escape sequence (\), Line terminator |
ECMA 262 edition 2 - section - 7.2
ECMA 262 edition 2 - section - 7.7.4
ECMA 262 edition 3 - section - 7.3
Prev | Home | Next |
new | Up | Newlines are not <BR> tags |
JavaScript Programmer's Reference, Cliff Wootton Wrox Press (www.wrox.com) Join the Wrox JavaScript forum at p2p.wrox.com Please report problems to support@wrox.com © 2001 Wrox Press. All Rights Reserved. Terms and conditions. |