Why people create JQuery?

Why people create JQuery?
Code on the pure JS:

let a = document.getElementById("somediv")

JS + JQuery:

// I think it is work
// Fix it if it doesn't work
1 Like

jQuery was originally used to simplify web page DOM manipulation and simplify AJAX requests, as well as fix browser compatibility issues. Its is not commonly used in new projects becouse the availability of better front-end frameworks such as React and Vue.js. Also Vanilla JavaScript is now more modern and can do things that jQuery do. In the past jQuery was used with make many things easier that were hard in older version of JS.

The primary reason why web developers still need to learn jQuery is the lot of old web pages that still use it. These pages need to be updated, but it may not be possible completely transform the entire web service to a new front-end framework.