xxxxxxxxxx
<!DOCTYPE html>
<html>
<title>JavaScript 严格模式use strict console.log ReferenceError示例 - 基础教程(div.cn)</title>
<body>
<h1>"use strict";</h1>
<p>要在浏览器中访问调试,请按F12,然后在调试器菜单中选择"控制台":</p>
<script>
"use strict";
coord = {x:10, y:20}; // ReferenceError: coord 没有定义
console.log(coord);
</script>
</body>
</html>