DEV Community

Discussion on: JavaScript Secrets

Collapse
 
dsbarnes profile image
dsbarnes

Excellent tips. I remember learning how to short circuit through counting substrings of a string like so:

arr.forEach(e => obj[e] = (ojb[e] || 0) + 1));

Changed my life.

Never knew about console.table(), that is just awesome.
Appreciate you sharing

Collapse
 
denicmarko profile image
Marko Denic

Hey @dsbarnes , thanks for reading and taking the time to comment. Glad you like it.