Open matiboy opened 6 years ago
Please have a look at your code again and propose code quality improvements. Here are some ideas:
keys
counts
toLowerCase
.forEach
for
undefined
if (this.counts[word] === undefined) { this.counts[word] = 1; this.keys.push(word); } else { this.counts[word]++; }
with a one-liner
anything else 👍
@thedanielforum fyi
Please have a look at your code again and propose code quality improvements. Here are some ideas:
keys
in the component (or injectable) or iscounts
sufficient (how?)toLowerCase
be used more efficiently than in a loop.forEach
be more relevant than thefor
loop (line 24)undefined
to validate the presence of a key in an objectwith a one-liner
anything else 👍