Skip to content

Instantly share code, notes, and snippets.

@LearningMaterial
Created April 3, 2018 18:53
Show Gist options
  • Save LearningMaterial/f2db5204447d4e980416002959cebb8b to your computer and use it in GitHub Desktop.
Save LearningMaterial/f2db5204447d4e980416002959cebb8b to your computer and use it in GitHub Desktop.
var JS = {
name: "The Javascript languaget",
log: function() {
this.name = "updated Javascript Language";
console.log(this);
var setName = function(newName) {
// this points to global object
this.name = newName;
};
setName("Updated Again, The Javascript language");
console.log(this);
}
};
JS.log();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment