Advantages of JavaScript
Speed. Client-side JavaScript is very fast because it can be run immediately within the client-side browser. Unless outside resources are required, JavaScript is unhindered by network calls to a backend server.
Simplicity. JavaScript is relatively simple to learn and implement.
Popularity. JavaScript is used everywhere on the web.
Interoperability. JavaScript plays nicely with other languages and can be used in a huge variety of applications.
Server Load. Being client-side reduces the demand on the website server.
Gives the ability to create rich interfaces.
Disadvantages of JavaScript
Client-Side Security. Because the code executes on the users’ computer, in some cases it can be exploited for malicious purposes. This is one reason some people choose to disable Javascript.
Browser Support. JavaScript is sometimes interpreted differently by different browsers. This makes it somewhat difficult to write cross-browser code.