Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

Chapter 3. JavaScript Syntax and Statements > JavaScript’s New Strict Mode

3.5. JavaScript’s New Strict Mode

ECMA-262 version 5 introduced a strict variant, commonly referred to as strict mode, which adds enhanced error checking and security. For example, to help fight against mistyped variable names, variable declarations require the use of the var keyword. Additionally, changes to the eval() function and other areas help JavaScript programmers to improve their code.

Strict mode is enabled with the following syntax, which is very similar to syntax used in Perl:


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial