Object.isPlain = function (o) { return o && o != null && o.constructor == Object; };
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; };
Object.combine = function (keys, values) { return keys.reduce(function (prev, v, i) { prev[v] = values[i]; return prev; }, {}); } Object.combine(['name', 'age'], ['Ivan', 33]) Object {name: "Ivan", age: 33}