Skip to content

Instantly share code, notes, and snippets.

@bergantine
Created March 17, 2012 19:09
Show Gist options
  • Select an option

  • Save bergantine/2064302 to your computer and use it in GitHub Desktop.

Select an option

Save bergantine/2064302 to your computer and use it in GitHub Desktop.
Wrap multiple functions to use JavaScript strict mode. #javascript
(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