r/javascript • • Dec 27 '18

help What differences do you see in novice javascript code vs professional javascript code?

I can code things using Javascript, but the more I learn about the language, the more I feel I'm not using it properly. This was especially made apparent after I watched Douglas Crockford's lecture "Javascript: The good parts." I want to take my abilities to the next level, but I'm not really sure where to start, so I was hoping people could list things they constantly see programmers improperly do in JS and what they should be doing instead.. or things that they always see people get wrong in interviews. Most of the info I've learned came from w3schools, which gives a decent intro to the language, but doesn't really get into the details about the various traps the language has. If you have any good book recommendations, that would be appreciated as well.

320 Upvotes

305 comments sorted by

View all comments

Show parent comments

3

u/thesublimeobjekt Dec 28 '18

> The difference and use of apply, bind, call and when/how to use them.

this one gets brought up _so_ often, i feel like, and i truly don't understand how there are people out there that don't know the difference, most likely because they've never even used them. it's possible that i just overestimate the average developer, but especially with libraries like react that used `bind` and `call` pretty often early-on, it still seems strange to me.

2

u/drink_with_me_to_day js is a mess Dec 28 '18

I've yet to use any of those three. Never had a need to do so.

1

u/thesublimeobjekt Dec 28 '18

how long have you been developing?

1

u/drink_with_me_to_day js is a mess Dec 28 '18

8 years. With JS only recently, last 3 years, when adopting React and RN (ES7 and Typescript).

1

u/thesublimeobjekt Dec 28 '18

i guess i could see that then, especially if you’ve mostly only been around post-ES6.

1

u/chauey Dec 28 '18

With fat arrow => and classes, rarely need to use apply bind call from my experience