Skip to content

Instantly share code, notes, and snippets.

@joshbuddy
Created January 19, 2010 05:51
Show Gist options
  • Save joshbuddy/280704 to your computer and use it in GitHub Desktop.
Save joshbuddy/280704 to your computer and use it in GitHub Desktop.
> String.prototype.markAsAwesome = function() {
> this.awesome = true;
> return this;
> }
> var s = "this is my string";
> puts(inspect(s));
< "this is my string"
> puts(inspect(s.markAsAwesome()));
< "this is my string"
> puts(inspect(s.awesome));
< undefined
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment