The "strict mode" (Strict mode) is the new syntax defined by ECMA-262 Edition 5, which means that you want to execute with a strict JavaScript syntax, and some of the past idioms will throw syntaxerror exceptions, such as:1. Variables not declared
The rigorous model introduced in ECMASCRIPT5 allows the developer to have a "better" JavaScript language by allowing JavaScript to run the environment to make and present different processes for the most common and difficult bugs in the development
E Cmascript 5 first introduced the concept of "strict mode" (strict). With strict mode, you can get inside the functionSelect to perform a more rigorous global or local error condition detection. The advantage of using strict mode is that you can
---restore content starts---Learning angular time, found a lot of excellent source code, JS files on the top, will be written "use strict"; These characters, search a bit, find a relatively good article, copied over to spare.Original link:
I. Overview
In addition to normal operating mode, ECMAscript 5 adds a second mode of operation: "Strict mode" (strict modes). As the name suggests, this pattern allows JavaScript to run under more stringent conditions.
The purpose of establishing a
I. OverviewIn addition to the normal operating mode, ECMAscript 5 adds a second mode of operation: "Strict mode" (strict). As the name implies, this mode allows JavaScript to run under stricter conditions.The purpose of setting up a "strict mode" is
Now JavaScript is more than just Web page effect script, more used to build large-scale Web applications, so the language specification of the developers are gradually aware of the syntax of JS to standardize, and deliberately guide the developer
This article mainly introduces the strict mode strictmode of Javascript, focuses on the use of the strict mode and the changes in the javascript syntax after the use of strictmode, if you need a friend, refer to the strict mode (strict mode) is a
Strict mode is a new syntax defined by ECMA-262 Edition 5, indicating that strict Javascript syntax is used to execute, some of the past-used writing will throw a SyntaxError exception, for example:1. var is not declared before the variable2. Use
Javascript Strict Mode detailedI. OverviewIn addition to the normal operating mode, ECMAscript 5 adds a second mode of operation: "Strict mode" (strict). As the name implies, this mode allows JavaScript to run under stricter conditions.The purpose
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.