Strict mode is the use of "use strict" in the scripting language, automatically using strict mode in ES5,6 mainly has the following limitations:
- Variables must be declared before use
- Function parameters can not appear with the same name attribute, otherwise an error
- You can not use the with statement
- Can not assign read-only attribute, otherwise an error
- You can not delete the property can not be deleted, otherwise an error
- You can not use the prefix 0 indicates octal, otherwise an error
- You can not use delete delete variables, such as ABC = var [. 1]; delete given ABC (not using strict mode returns to false) , the deleted property can delete abc [0]
- eval it will not be introduced into the enclosing scope variables
- eval and arguments can not be reassigned
- Function arguments do not automatically change the reaction parameters
- You can not use arguments.callee
- You can not use arguments.caller
- Return undefined when the ban this point to the global object, use this
- You can not use fn.caller and fn.arguments get the function call stack
- An increase of reserved words (protected, static, interface)