JavaScript vs. jQuery

…this is a debate that seems to have no definitive conclusion, at least not in the foreseeable future. Objectively and theoretically speaking, you could do the same things using either one of them, and you can mix them up as well. So why do developers have an affinity for one or the other, even though they could create the same effects using either one of them?

Before starting to look at the advantages and disadvantage each one has, we need to clarify a few items. Many people think that jQuery and JavaScript are two separate languages. In fact, jQuery is just the most popular library of JavaScript code. Its success relies on the optimisation performed over time by developers who worked on it open-source.

The debate:

The first point goes to jQuery because, by using it, you can do the same thing you would do in JavaScript, but in fewer code lines. The easier and faster it is, the more developers love a language, so we can really relate to this argument.

On the other hand, in some projects, the developer may be required to use traditional JavaScript. You need to know, however, that jQuery is sufficient for most projects. Point for JavaScript here, though.

We must also consider the issue of browser-compatibility. While jQuery was optimised to work automatically on all popular browsers, JavaScript still has some issues here.

Our advice:

You can choose either one of them if you are developing a website from the beginning, but if you are working on projects with/after someone else, you may need to know both.