Skip to content

Instantly share code, notes, and snippets.

@dagezi
Created February 21, 2018 03:01
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 dagezi/73b544fb49ce504b7a92ffb09953278a to your computer and use it in GitHub Desktop.
Save dagezi/73b544fb49ce504b7a92ffb09953278a to your computer and use it in GitHub Desktop.
What's wrapping object?
console.log(this === global ? "global" : this)
var nstrict = function() {
console.log(this === global ? "global" : this)
}
var strict = function() {
"use strict";
console.log(this === global ? "global" : this)
}
nstrict()
strict()
obj = {name:"obj"}
obj.nstrict = nstrict
obj.strict = strict
obj.nstrict()
obj.strict()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment