Skip to content

Instantly share code, notes, and snippets.

@kentcdodds
Created July 19, 2018 15:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kentcdodds/a95990593acb9db51e419ce8ba3e34de to your computer and use it in GitHub Desktop.
Save kentcdodds/a95990593acb9db51e419ce8ba3e34de to your computer and use it in GitHub Desktop.
console.log(this === module.exports)
fn()
strictFn()
function fn() {
console.log('in function', this === global)
}
function strictFn() {
'use strict'
console.log('in strict function', this === undefined)
}
// info to answer questions I always get
// no matter how many times I answer:
// extension: Quokka
// font: Dank Mono
// theme: Night Owl
// see kcd.im/mft for links
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment