Skip to content

Instantly share code, notes, and snippets.

View patrickgalbraith's full-sized avatar
🏠
Working from home

Patrick Galbraith patrickgalbraith

🏠
Working from home
View GitHub Profile
@patrickgalbraith
patrickgalbraith / gist:9538b85546b4e3841864
Created September 4, 2014 05:54
Javascript dynamic getter, setter using defineProperty
var User = (function () {
function User (id, nam) {
var self = this;
this.id = id;
this.nam = nam;
this.__data = {};
for(var p in self) {