function myHash(list) {
var result = {};
for (var i = 0; i < list.length; i++) {
result[list[i][0]] = list[i][1];
}
return result;
}
console.log(myHash([['foo', 'bar'], ['baz', 42], [true, false]]));
var list = [['foo', 'bar'], ['baz', 42], [true, false]];
var result = list.reduce(function (obj, item) {
obj[item[0]] = item[1];
return obj;
}, {});
console.log(result);