Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

JavaScript Understanding "this" in JavaScript

Pitrov Secondary
Pitrov Secondary
5,121 Points

Is "this" something I really need to understand and learn?

Could I be just fine without "this"? Should I try to learn this or just go on?

2 Answers

Jillian S. Estrella (she/her)
Jillian S. Estrella (she/her)
15,720 Points

Yes absolutely you should learn it. You will encounter it a lot in JS. Truly though, it’s not that abstract. It’ll make sense if you just spend a short time with it.

Learning to program is a lifestyle. It’s a life long learning journey. I think that’s what sets it apart from a lot of other trades - I’m not sure a person could ever learn it all. There’s so much to learn in computer science and programming, a person could spend a lifetime. Therefore it should come as no surprise that, I believe, the best programmers are those who never stop learning.

While I don’t know what your personal goals are (just tinkering vs seeking a career), if you wish to get good at JS or any other language, you should do so whole heartedly. It’ll be easier on you in the long term. For anything you wish to master, programming or otherwise, always make certain that you have a strong foundation from which to build.

I'd say it's always best to try and at least understand the fundamentals. It can help you down the line when trying to learn a language like Python or Java