r/javascript • • May 28 '19

What are some JavaScript things beginners don't know?

333 Upvotes

383 comments sorted by

View all comments

135

u/theMightyPanda27 May 28 '19

Promises. They are quite tricky to understand for a beginner, but very convenient as one masters.

29

u/senocular May 28 '19 edited May 28 '19

Normally I would agree with you, but lately that doesn't seem to be the case.

I've been doing a lot of interviews lately and probably the one thing people have consistently showed a keen understanding of is promises. Where people have slipped up the most? this. While I get this is tricky (it's already been brought up a few times in this thread) I've also always considered promises to have a bit of a learning curve, especially compared to the more classic callback approach. But I guess learning material nowadays, and I guess apis in general, use them so much that people need to learn them a lot sooner than before...? Not sure, but I thought that was a little interesting takeaway from these interviews.

Edit: This said with a sample set of "advanced beginners"

0

u/[deleted] May 29 '19

[deleted]

3

u/senocular May 29 '19

...unless the function was created with bind() or an arrow function. And then you have changes of behavior based on strict mode...

There's another part of this thread where someone argues that this isn't confusing, but I'm not sure there's anything else as complicated as it is in JS. So relatively speaking, it's up there.

→ More replies (3)