Notice in the example below that both create
and update
are identical. I believe it is possible to have update
just be an alias to create
's code without needing to write it out a second time.
this.VAROPS = {
// variable operations
create: function(id, value) { variables[id] = value; }
, delete: function(id) { delete variables[id]; }
, update: function(id, value) { variables[id] = value; }
};