Skip to content

Instantly share code, notes, and snippets.

@epicserve
Created March 17, 2016 13:47
Show Gist options
  • Select an option

  • Save epicserve/7e23f1141805cde1b920 to your computer and use it in GitHub Desktop.

Select an option

Save epicserve/7e23f1141805cde1b920 to your computer and use it in GitHub Desktop.

Revisions

  1. epicserve created this gist Mar 17, 2016.
    19 changes: 19 additions & 0 deletions js_pattern.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,19 @@

    function Thing(name) {
    this.thing = name;
    }

    Thing.prototype = {

    get_thing: function() {
    return this.thing;
    },

    set_thing: function(name) {
    this.thing = name;
    }

    };

    new Thing('foo');