-
-
Save timoxley/3070374 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
function createResponse(name) { | |
this.name = name, | |
this.sayHi = function() { | |
return 'Hi!'; | |
}, | |
this.getName = function() { | |
return this.name; | |
}, | |
this.inspect = function() { | |
return 'This should be outputted'; | |
}; | |
} | |
var test = new createResponse('John Doe'); | |
// Should output a custom text, such as 'user: John Doe', instead of giving all visible variables | |
console.log(test); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment