Free-format language (Definition)

A somewhat relaxed layout strategy for source code.

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.

See also:Automatic semi-colon insertion, JavaScript language

Cross-references:

Wrox Instant JavaScript - page - 17