我看到有人推荐使用"use strict"选项。正如这里所提到的,在它们的最新版本中,包括Internet Explorer 10和Opera 12在内,每个主流浏览器都支持严格模式。我想用IE10进行测试,并编写了以下代码段,但是IE10 / FF没有给出任何错误消息。我遗漏了什么?如果我犯了错误,如何测试"use strict"是否真正起作用?
<html>
<head>
<script type = "text/javascript">
"use strict";
function doSomething(value1, value1, value3) {
alert('hello');
}
</script>
</head>
<body>
hello
</body>
</html>