Skip to content

Instantly share code, notes, and snippets.

@edysegura
Created November 7, 2016 11:01
Show Gist options
  • Save edysegura/a52b15760b644f84adbe700d3cd54383 to your computer and use it in GitHub Desktop.
Save edysegura/a52b15760b644f84adbe700d3cd54383 to your computer and use it in GitHub Desktop.
[JS] Why use strict mode in JavaScript
function withoutStrict() {
console.log(this)
}
function withStrict() {
"use strict";
console.log(this)
}
withoutStrict() //object window
withStrict() //undefined
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment