markdown guide
 
 

Type coercion is definitely not obvious in JavaScript

[] == ![] // true 😱
 

IMHO, don't ever ever ever use == in JavaScript. Always use === instead and forget about type coercion; just explicitly type-cast anything you need to.

 

It's a very rare case when you work on a project alone. Other developers can use == and it's necessary to understand how type coercion works.

I agree that most of developers consider == as evil. But Kyle Simpson (You don't know JS author) don't hate type coercion. Moreover, he recomments to use == where necessary.

In other words, coercion, especially implicit coercion, has usages where it actually improves the readability of our code.

Source.

 

When I started writing JS it was hard to get an understanding of what prototype is and how it's used.

 

Closures. It's a complicated subject involving an understanding of how the execution context works and how variables are scoped and held within the JavaScript engine. It takes a lot of practice and theory for closures to finally click. It took me like six months to finally grok it.

 

Javascript has a lot of layers. Understanding what is controlling each piece can be hard to parse if you're new. I actually wrote something on this a while back.

 
 

Newest confusion is parseInt. Just try and see what happens if you do parseInt(0.000000347)

 
 

The ecosystem. Every time I come back to JS the tooling is entirely different. Makes it frustrating to get things done.

 
Classic DEV Post from Mar 29

Code of Conduct generator!

Tl;dr: I've just launched The Code of Conduct Generator! When I was asked to...

Tomasz Łakomy profile image
Senior Frontend Engineer at OLX Group. Tech speaker, egghead.io instructor, jQuery evangelist.

Sore eyes?

dev.to now has dark mode.

Go to the "misc" section of your settings and select night theme ❤️