Can someone explain to me my error in logic for why this doesn't work to assign a key value pair in javascript and initialize their values to 0? The values return as undefined.
What is the best way to do this instead?
Example:
const letters = ['i','c','l','e'];
let dict = {};
dict = letters.map(value => dict[value] = 0);