What's a JavaScript concept that you're still confused about?

twitter logo github logo ・1 min read

To all the JavaScript developers out there (beginners and more experienced): what's a JavaScript concept that still confuses you? Don't be shy and share your thoughts!

I asked the same question on Twitter and Linkedin, I've got:

"Not a beginner, but closures are still kinda hard"

"destructing. Still a bit tricky when it comes to reassign an object inside an object"

"Dynamically adding elements to the DOM but it looks like React makes doing things in vanilla unnecessary"

And how about you?

twitter logo DISCUSS (5)
markdown guide
 

Did you know that in JavaScript, classes are functions? Oh, and functions are actually objects. Oh, and, to complete the loop, the objects in JavaScript inherit from Object class. Wait, what?

Once you get some experience in JavaScript and start playing around, you start wondering, why does this return a function: Object.getPrototypeOf(()=>{})? And what happens if I call it?

Also, combining with and Proxies can make JavaScript significantly more WEIRD, like weird to the point of actually making 0 sense at all.

 

+1 to the closures!

I mean, I understand the concept and the basic examples, but they're making me go crazy with React Hooks.

 

Why does

caches.match()

Dont reject on error but return undefined πŸ˜‚

developer.mozilla.org/en-US/docs/W...

 
Classic DEV Post from May 11

Getting Trapped as an Expert Beginner

Valentino Gagliardi profile image
Educator and consultant, I help people learning to code. Teaching JavaScript and Python.

Customize DEV by logging in

  • Follow users
  • Follow tags
  • Dark mode
  • Font style (like sans serif)
  • Notifications
Get Started