DEV Community

Discussion on: Tired of Guessing What 'this' Is Referring To?

Collapse
 
jdforsythe profile image
Jeremy Forsythe • Edited

I'd advise to avoid writing code that uses this altogether. It avoids issues with juniors misunderstanding and promotes less complex code. I don't think I've used it on purpose in the last handful of years.

Collapse
 
kadajett profile image
Jeremy Stover

Not using this excludes you from a vast amount of logic. Modern JavaScript is centered around classes where it is necessary to use this in most cases. Maybe you have some technique I'm not aware of. I'd love to hear it if so!

Collapse
 
guin profile image
Angelika Jarosz

Introducing less complexity is always great! I do think its an important concept of the language to understand though.