Created
March 17, 2012 19:09
-
-
Save bergantine/2064302 to your computer and use it in GitHub Desktop.
Wrap multiple functions to use JavaScript strict mode. #javascript
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (function() { | |
| // http://www.nczonline.net/blog/2012/03/13/its-time-to-start-using-javascript-strict-mode/ | |
| "use strict"; | |
| function doSomething() { | |
| // this runs in strict mode | |
| } | |
| function doSomethingElse() { | |
| // so does this | |
| } | |
| }()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment