DEV Community

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

Valentino Gagliardi on June 12, 2019

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 ...
Collapse
 
guitarino profile image
Kirill Shestakov

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.

Collapse
 
esandez profile image
esandez

+1 to the closures!

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

Collapse
 
anwar_nairi profile image
Anwar

Why does

caches.match()

Dont reject on error but return undefined ๐Ÿ˜‚

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

Collapse
 
sudiukil profile image
Quentin Sonrel

JavaScript.

Collapse
 
valentinogagliardi profile image
Valentino Gagliardi

me too? :-p