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.
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!
I love to create responsive data driven web apps with intuitive user experiences. When not writing code, I spend my time immersed in dance, aerial arts, and learning spoken languages.
Location
NYC
Education
City College of New York - B.A. in Advertising and Public Relations
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.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!
Introducing less complexity is always great! I do think its an important concept of the language to understand though.