How to make an object with alphabet keys in JavaScript?
Do you have a better idea? I pulled it out in an elegant way.
I pulled it out in an elegant way.
const objWithAlphabetKeys = {};
for (let i = "a".charCodeAt(0); i <= "z".charCodeAt("z"); i++) {
objWithAlphabetKeys[String.fromCharCode(i)] = [];
}