"use strict"

mac2022-06-30  70

"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>

  

转载于:https://www.cnblogs.com/diligenceday/p/4018340.html

相关资源:JAVA上百实例源码以及开源项目
最新回复(0)