JavaScript is a free-format language. That means it has a very relaxed attitude to the organization and layout of the script source text. You can place multiple statements on one line and separate them with semi-colons. It is also forgiving enough to allow you to omit semi-colons, which it will put in for you as the script is executed. There are some cases where this cannot apply because for JavaScript to do this, the programmer's original intent must be quite unambiguous. This is called automatic semi-colon insertion and is covered in a topic of its own.
Prev | Home | Next |
FRAMESET.tabIndex | Up | ftp: URL |
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. |