← Back to JavaScript exercises

64. Count Words

Result appears here
const f={};[..."hello"].forEach(x=>f[x]=(f[x]||0)+1);output.textContent=JSON.stringify(f);