Object.combine = function (keys, values) { if (keys.length == values.length) { var r = {} , i = 0; for (; i < keys.length; ++i) { r[keys[i]] = values[i]; } return r; } return null; };