function Variables() {};
Variables.prototype.useMethod = function (method) {
for (var i in this) {
this.hasOwnProperty(i) && method(this[i]);
};
};
var vars = new Variables;
vars.myVar1 = "Java";
vars.myVar2 = "Script";
vars.useMethod(function(variable){ console.log(variable); })