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

Julian Laub
Julian Laub
1,982 Points

Actual Use: JavaScript vs. JQuery

In the daily use of JavaScript, that is in Front End Applications of all sorts of companies, is there any JavaScript even used or is it JQuery basically in addition with other libraries?

6 Answers

(Joke answer about Js frameworks here: This is the best Javascript framework I've ever seen! vanilla-js)

To answer your question about everyday use, it depends on what you are doing. A lot of people use jQuery, its a super friendly library. So far as real world examples, it depends on the purpose of the JS. Here are some examples; need to quickly write some frontend DOM JavaScript? that is jQuery's wheelhouse. Are you writing an AJAX call, jQuery all the way. Are you writing a plugin where speed and response time is a huge factor, vanilla JS. Lastly and this is a little bit more advanced, but is some cases you might need target the native DOM API ie;document.getElementById('foo');because when you write this; $('#foo');, theses two are actually not entirely the same thing. $('#foo'); is a jQuery object not a native DOM element. For more info I suggest reading this blog post Lea Verou

So in the end, like most languages and frameworks, it's about what you are trying to accomplish.

PS for job prospects, if you are looking for work in the ad agency world when they say JavaScript 8/10 times they mean jQuery, if you are looking for programming jobs(backend) or jobs that say React or whatever they mean vanilla Javascript.

Julian Laub
Julian Laub
1,982 Points

The last three lines answered my question. Backend jobs always entail JAvaScript only as a small part - is that right? I mean besides node.js there is not much JavaScript, right?

Just to take an example - would that be JavaScript or JQuery? https://de.indeed.com/cmp/Vision-Recruit/jobs/Senior-Frontend-Developer-568cf02d7bfba86b?sjdu=Aj8fnI-wbineBf11iHvnFlEQcCGKPDd26qp_pQ6XvqOw3nrHAma5ck3x52moB_q3vw-849DePGBeJSkobZo6HRZ_iuIiqAJmB7e5bIkDL34

I hate to burst your bubble, but everything in the Responsibilities section of that post is Javascript, except for the following:

css styling is not a problem,

git

unix/bash console

vagrant

In short, if you want to be a frontend dev, you have to know JavaScript, not just a framework like jQuery. A great place to start learning JavaScript is through jQuery, but you will have to know Vanilla JS at some point if you want to be a senior frontend dev like the job you posted.

PS also know Sass.

PPS Remember that is a SENIOR position. Even though they say two years of JS experience, What they mean is two years of doing all that was listed. You do not need to know everything there in order to get a job. That is why if you are looking at potential jobs look for Jr. frontend dev. Those job listings will be what you want to look at.

Julian Laub
Julian Laub
1,982 Points

Actually, my bubble is still floating well. Good to know JavaScript is actually in use.

Interesting to heat that Vanilla.js is a thing and I never even heart of it. Going to check it out.

This guy solves Code Challenges. And he uses p5.js - is that a thing? Is it worth doing his challenges with p5.js? - they would be a good way to dive deeper ... https://www.youtube.com/watch?v=AaGK-fj-BAM

I'm glad your bubble did not burst. So vanilla-js is a joke site on frameworks, like jQuery, and p5.js. When you say something is vanilla it means its original self. so for example vanilla CSS is regular CSS, not Sass, same goes for JavaScript. It's just a term some people use. Vanilla-js is not a framework, thats the joke.

in regards to p5.js. Everyone has their preferences and so forth, but I can do everything in that framework by using one line of JavaScript and that is div.classList.add("foo"); then write Sass for the class .foo and I'm done. Someone here might say use it and thats cool, but for me, I would never use this framework ever. I am in the camp of for styling a site you use CSS and for interactivity you use JavaScript.

Julian Laub
Julian Laub
1,982 Points

Thanks. Ok, that makes sense.

So, are you using JavaScript in your job mostly?

Depends on what I'm doing that day. I will say for frontend I use Sass everyday, and gulp. So yeah, I use JS everyday, doesn't mean I write JS everyday. It depends on what I'm building.

Julian Laub
Julian Laub
1,982 Points

I see. When do I know I am ready to apple for a job? It's kind of a blurry line I feel.

Honestly, I have no idea. You're ready when your ready. There is a lot to learn and it can seem like a mountain of stuff. If you are starting out I would suggest completing the frontend track here on Treehouse to start. This will give you a solid foundation. Take your time, build some stuff and put it up on github. you're ready when you look at job postings and say, yes I do all or almost all that is required, and that you feel confident in what you are doing. Also go to some local meet ups in your area, its a great place to get involved and learn, and by seeing what other people are doing you can gauge if your job ready. Remember it's a process and takes time. Learn something new EVERY DAY!

Thomas Nilsen
Thomas Nilsen
14,957 Points

It's very common in the real world to use frameworks / libraries like Angular, jQuery and Ember.

But if you have a good understanding of plain javascript, it's easy to learn the frameworks.

Remember, all of the frameworks is written in plain javascript.

JQuery is basically a big add-on to JavaScript. It lets you interact with the HTML elements, animate them, get the contents, etc. If you ever used the DOM, it is very similar to that except more powerful. Here's an example of JQuery that does the same thing the DOM does:

// Both of these select a element with a name ID.

$("#name");

document.getElementById("name");

If you are deciding if you should learn JQuery or not, I would say go for it! It is very commonly used among websites (probably even used on Treehouse) and it is a wonderful tool to add to your toolbox.

I hope this helps. ~Alex

Julian Laub
Julian Laub
1,982 Points

Thanks, but I was curious on what is actually being used daily by professional developers. If I apply for a job in tech do they even use plain JavaScript?

Well... Professionals use JQuery all the time, but I wouldn't say you can't get a job without JQuery. The most important thing is that you can write code to help the company and you don't always need JQuery to do that :)

Sometimes, you write code that doesn't directly interact with the web browser. For example; If you need to calculate what's the most common topic in the Community, you don't really need to interact with the web browser; maybe some other people will do that for you. All you need to do is interact with the database that stores all of the questions and pull out some information.

Julian Laub
Julian Laub
1,982 Points

I have a good understanding of JavaScript as it is. But I am not expert. So should I delve deeper into JavaScript or focus solely on the frameworks?

Thomas Nilsen
Thomas Nilsen
14,957 Points

Nothing wrong with doing both;

Here is a excellent course if you want to get a deeper understanding of javascript (granted, it's pretty advanced)

Julian Laub
Julian Laub
1,982 Points

Nice reference thanks