Limits (Definition)

A set of constraints within which the script must operate.

There are mainly two kinds of limits that an implementation imposes on a JavaScript script source text. There are those constraints required by the environment and there are numerical limits dictated by the internal data type representations.

Environmental limits are, for example, the security mechanisms in a web browser. Other environmental limits may impose a maximum limit to the size of a JavaScript source text. It is unusual to encounter this limit, but in an embedded interpreter the storage available to buffer the script as it is interpreted may be limited to 32K or 64K in situations where the script interpreter is used in a home appliance.

Numeric limits are those such as the size of the smallest and largest numeric value that can be represented or the maximum length of a string.

In general, the limits are either self-evident from the context in which the script is being executed or can be deduced by using certain properties of the Global object or the Number class.

See also:Compliance, Environment, Global object, Minima-maxima, Number object