I would like to have this object:
const m = {a:undefined, b:undefined, d:undefined};
but would prefer to produce it from an array:
const m = {}
const l = ["a","b","c"];
for (const i in l){
m[l[i]] = undefined;
}
But what would be a nicer way of doing this when using es6?