Skip to content

Instantly share code, notes, and snippets.

@sanandnarayan
Created August 23, 2013 11:44
Show Gist options
  • Save sanandnarayan/6318439 to your computer and use it in GitHub Desktop.
Save sanandnarayan/6318439 to your computer and use it in GitHub Desktop.
why cant Dhone introduce himself?
// question: why cant Dhone introduce himself?
// please fix it. Make Dhoni introduce himself!
var Man = function( name ) {
this.name = name
}
Man.prototype.introduce = function() {
console.log( this.name )
}
// make a new instance of a Man
var dhoni = new Man('Dhoni')
// make Dhoni introduce himself immediately
dhoni.introduce()
// in 1 second we want Dhoni to introduce himself again
setTimeout( dhoni.introduce , 1000 )
@mwcz
Copy link

mwcz commented Jan 7, 2014

@@ -1,4 +1,4 @@
-// question: why cant Dhone introduce himself?
+// question: why cant Dhoni introduce himself?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment