Something like this should work:
var props = ["id", "name", "parent", ...]; Core.registry.taskItemSelected = {}; for (var i = 0; i < props.length; i++) Core.registry.taskItemSelected[props[i]] = "";
Edit: following the OP comments, here is the best version with the same end result:
Object.prototype.declare = function (varArray) { for (var i = 0; i < varArray.length; i++) { this[varArray[i]] = {}; } };
And a live test case: http://jsfiddle.net/5fRDc/
Shadow wizard
source share