Skip to content

Instantly share code, notes, and snippets.

@silent-lad
Last active March 15, 2019 17:36
Show Gist options
  • Save silent-lad/6fe72de390f22bda15baeb276b37b4cb to your computer and use it in GitHub Desktop.
Save silent-lad/6fe72de390f22bda15baeb276b37b4cb to your computer and use it in GitHub Desktop.
function those () {
'use strict';
console.log("Strict function hence this is undefined,Or is it?")
console.log(this === window);
}
let confused = {
those: those,
these: function() {
console.log(this === window);
}
}
confused.those(); //FALSE
let evenMoreConfused = confused.these;
evenMoreConfused(); //TRUE
confused.these(); //FALSE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment