Previous: Copyright Header, Up: Source Files [Contents][Index]
ECMAScript 5’s
Strict Mode
throws errors in more situations that may lead to buggy code,
allows for better optimization of ECMAScript code during runtime,
and prohibits syntax that conflicts with future ECMAScript versions.
It also enables certain features,
like using let
inside blocks.
It should always be enabled going forward as shown in Figure 10.3. The statement should immediately follow the copyright header (see Copyright Header), before any other code.