Created
April 3, 2018 18:53
-
-
Save LearningMaterial/f2db5204447d4e980416002959cebb8b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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