Created
April 30, 2013 19:17
-
-
Save cianclarke/5491180 to your computer and use it in GitHub Desktop.
this & that
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 jos = { name : 'Jos' }; | |
jos.getFullName = function(surname) { | |
var that = this; | |
var printName = function(surname){ | |
console.log("Full name", this.name + ' ' + this.surname); | |
console.log("Full name", that.name + ' ' + surname); | |
} | |
printName('Parker'); | |
} | |
jos.getFullName(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment