zoukankan      html  css  js  c++  java
  • use strict

    https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Strict_mode

    ECMAScript 5's strict mode is a way to opt in to a restricted variant of JavaScript. Strict mode isn't just a subset: it intentionally has different semantics from normal code. Browsers not supporting strict mode will run strict mode code with different behavior from browsers that do, so don't rely on strict mode without feature-testing for support for the relevant aspects of strict mode. Strict mode code and non-strict mode code can coexist, so scripts can opt into strict mode incrementally.

    Strict mode makes several changes to normal JavaScript semantics:

    1. Eliminates some JavaScript silent errors by changing them to throw errors.
    2. Fixes mistakes that make it difficult for JavaScript engines to perform optimizations: strict mode code can sometimes be made to run faster than identical code that's not strict mode.
    3. Prohibits some syntax likely to be defined in future versions of ECMAScript.

  • 相关阅读:
    SQL注入的一般步骤及防范方法
    防止SQL注入的五种方法
    document.getElementById("orderform").submit() 提交给了谁?
    页面调试-F12
    rs.last()续
    rs.last()
    14课后习题
    HashMap
    链表
    习题
  • 原文地址:https://www.cnblogs.com/rsapaper/p/8419236.html
Copyright © 2011-2022 走看看