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

Pure JavaScript vs jQuery / Angular JS

Hello you all.

I have a couple programmers friends, one is a Senior Dev and the old one is a Principal. I've noticed that ALWAYS when I asked them a question about Pure JS they always answer with something regarding jQuery or Angular JS, and say that they have years without using Pure JS.

I have a basic knowledge on JS, I know how to make functions and now I am learning Constructors. I would like to have some feedback, I would like uiy to tell me if with the level I have I can start now learning jQuery or Angular JS, my friends says that if I don't have jQuery knowledge the companies will not hire or would be difficult to get a job.

To be honest: Pure JS in some aspects is very hard to understand, they say that jQuery will make it easier.

Pd: sorry about my english, I am not a native speaker. I hope you understand.

2 Answers

Dave McFarland
STAFF
Dave McFarland
Treehouse Teacher

You never completely escape pure JavaScript -- you need to understand JS to do any JavaScript programming even with jQuery. For example, jQuery isn't really going to help you with Constructors, or object oriented programming with JavaScript.

However, jQuery helps with many common tasks like selecting DOM elements, manipulating them, injecting new content into a page, adding event handlers to elements, and making AJAX requests, for example. You don't necessarily need plain JavaScript for these tasks.

You SHOULD learn jQuery -- it's the most popular JavaScript library and it IS very useful. But keep studying JavaScript especially JavaScript design patterns, since you'll use those all the time when programming.

I would also like to add to this and say that it depends on your goals. If you are trying to be a Web designer, don't worry about learning lots of pure java script. But if you want to be a front end developer, you had better know everything there is to know about pure js, jquery, and Angular to stay competitive. It depends on how much you want to specialize.

Both JQuery and AngularJS are libraries (AngularJS is a framework though, not sure). In other words, it is a bunch of code that you won't have to write over and over.

I have no knowledge of AngularJS but I do know that JQuery is a library to manipulate the DOM (Your HTML and CSS of your website).

For example, with barely 3 lines of code you can check when something is clicked on your site:

$(document).ready(function() {
    $('#submit').click(function() {
         // Logic
    });
});

Now, most of the times people are suggested to learn the core programming language, and then getting into learning libraries and frameworks. This isn't the common case for JQuery. A lot of people get into JQuery first, sometimes they even confuse it as a standalone programming language. And then they get into actual Javascript. If you already know about Javascript objects, you probably already know enough to get into JQuery. All it takes are to know the syntax. Comparison operators, Assignment operators, arrays, loops, functions, objects.

As for AngularJS, I do not know about it but just by looking at their website and checking the docs. It is way more complex than JQuery. So I can not give you suggestions on that other than, learn it when you feel ready for it.

Learning frameworks can be tedious sometimes, but if done at the right speed, knowing multiple frameworks will bring you more luck when looking for a job because you will be able to provide solutions and you will know what tool is best for the job.

Cheers!