"use strict";
//严格模式
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>无标题文档</title>
</head>
<body>
<script>
"use strict";
(function() {  
     var a = b = 5;
})();
//这个会报错哦; console.log(b); </script> </body> </html>

<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>无标题文档</title>
</head>
<body>
<script>
(function() {  
     var a = b = 5;
})();
//这个居然跑出来一个5,尼玛!! console.log(b); </script> </body> </html>

  

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-03-03
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-08-28
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-11
  • 2022-01-13
  • 2022-02-20
  • 2022-12-23
相关资源
相似解决方案