"use strict"

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

  

posted @ 2014-10-11 09:34  方方和圆圆  阅读(239)  评论(0编辑  收藏  举报

再过一百年, 我会在哪里?