What JavaScript concepts still confuse you after all this time?

0
3
Asked By CodeWizard42 On

I've been working with JavaScript for a while now, and every time I think I've got a solid grasp, some tricky concept like `this`, `null`, or certain async behaviors throw me off. I'm curious if others face this too—what JavaScript concepts do you still find puzzling or have to double-check regularly?

5 Answers

Answered By AsyncAdventurer On

Working with promises tends to confuse me, especially when it goes beyond a simple resolve. I'll get the concept, but the syntax feels tricky every time! It’s like, I need to think extra hard about it, and that’s not a great feeling.

InSyncDev -

I hear you, async/await has made things easier for me but I still find myself getting tangled up sometimes.

DebuggingNinja -

Right? I can relate. Async stuff in general gives me a headache.

Answered By TypoTango On

I frequently mess up words while typing, like accidentally writing 'funciton' instead of 'function', and it gets stuck in my head for a whole week with that song playing on repeat! It's frustrating but also a hilarious moment when it happens.

MaybeNotSoSmart -

You must be joking! Now I've got that tune in my head too. May your next bug be a headache—good luck!

Answered By CuriousCoder On

Substring and substr have me puzzled too! Substr is deprecated now, so it's best to stick with substring. I remember when they first introduced it, and I kept mixing up which to use, leading to hours of frustration trying to debug!

BetterLuckyThanGood -

Glad I'm not alone in this! Slice has become my go-to method.

OldSchoolDev -

Yeah, just forget about `substr`! And don’t even get me started on how slice works differently.

Answered By JavaScriptJunkie On

You know, it’s usually the small things that trip me up, like remembering whether to use `includes()` or `contains()`, and when an object supports `map()`. Also, I'm always mixing up `target` and `currentTarget` and sometimes can’t remember the difference between `innerText` and `textContents` when working with DOM elements.

ConfusedCoder -

Right? It's a constant struggle deciding whether to use `some` or `any`. For a sec, I wasn't even sure how to explain the difference just now!

Answered By NerdyNerd On

Using functions and getting `this` to behave correctly is still a challenge for me, especially in callbacks. I just can’t seem to wrap my head around the differences!

ArrowFunctionAdept -

I get it! It seems like arrow functions should be less complicated, but they still trip me up.

ConfusedButTrying -

Once you get it, it's pretty straightforward, but until then, it’s a maze!

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.