DEV Community

Cover image for 7 JavaScript Hacks for 2020

7 JavaScript Hacks for 2020

Patrick God on January 06, 2020

JavaScript has evolved tremendously and there's almost no way around it. It's good to know one or two hacks that make your developer's life a bit e...
Collapse
 
monsieurmechant profile image
Adam Mechant

Those are features, not hacks 🤨

Collapse
 
_patrickgod profile image
Patrick God

True. Thanks for pointing that out. I just thought, "hacks" sounds nice. ;)

Collapse
 
Sloan, the sloth mascot
Comment deleted
Collapse
 
ayekpleclemence profile image
Ayekple Clemence

In article the Styling Console Messages I used

console.log('%cStyling Console Messages', 'color:green; background:#33eeaa; font-size:25px;')

Styling console message is makes debugging easier.

Collapse
 
_patrickgod profile image
Patrick God

Hey Julien,

Thank you. And thank you for the other way of using console.log(). You can even colorize the console with console.log(). It's crazy what you can do nowadays. :D

Take care,
Patrick

Collapse
 
lucis profile image
Lucis

I think console.log({hero}) is a better way than console.log('hero', hero'). I use it all the time, thought you would like it ;)

Nice post

Collapse
 
_patrickgod profile image
Patrick God

That's great! Thank you! :)

Collapse
 
emerson88 profile image
emerson88

A good summary of the js features ES5/6. Those are very useful. I liked the part to use filter, map and reduce.

Thanks.

Collapse
 
_patrickgod profile image
Patrick God

Thank you very much. :)

Collapse
 
bakercode profile image
Beicker

This is simply great. Thanks a lot for sharing with us those features. I am a beginner and i only know to use the console for debugging and now It will be easier.

Collapse
 
_patrickgod profile image
Patrick God

Thank you! Glad I could help. :)