Skip to content

Instantly share code, notes, and snippets.

@ryan-allen
Created December 24, 2009 04:31
Show Gist options
  • Select an option

  • Save ryan-allen/263010 to your computer and use it in GitHub Desktop.

Select an option

Save ryan-allen/263010 to your computer and use it in GitHub Desktop.
// i was wondering...
var stu = {name:'stu'}
var ry = {name:'ry'}
var namer = function () {
print("wtf is this? it's " + this.name + "!!!")
}
stu.wtf = namer
ry.wtf = namer
stu.wtf()
ry.wtf()
/*
$ js wtf_is_this.js
wtf is this? it's stu!!!
wtf is this? it's ry!!!
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment