Use Strict: How to check it?

I've read people recommending using the "use strict" option. As mentioned here

every major browser supports strict mode in their latest version, including Internet Explorer 10 and Opera 12. I wanted to test it with IE10 and I have the following segemnt code. IE 10 / FF did not issue an error message. What am I missing? How do I check that "use strict" actually works if I'm wrong?

<script type = "text/javascript">
"use strict";
function doSomething(value1, value1, value3) {



source to share

2 answers

In this example, you can see that Chrome is actually complaining about the duplicate argument name:



firefox throws 'duplicate formal value value1',

IE10 throws 'Duplicate formal parameter names are not allowed in strict mode'



All Articles