Task:- 7.2

Raja Sharma
3 min readAug 19, 2021

Javascript and it’s use cases

What is JavaScript?

JavaScript is a dynamic computer programming language. It is lightweight and most commonly used as a part of web pages, whose implementations allow client-side scripts to interact with the user and make dynamic pages. It is an interpreted programming language with object-oriented capabilities.
JavaScript was first known as LiveScript, but Netscape changed its name to JavaScript, possibly because of the excitement being generated by Java. JavaScript made its first appearance in Netscape 2.0 in 1995 with the name LiveScript. The general-purpose core of the language has been embedded in Netscape, Internet Explorer, and other web browsers.

What is JavaScript used for?

JavaScript is mainly used for web-based applications and web browsers. But JavaScript is also used beyond the Web in software, servers and embedded hardware controls. Here are some basic things JavaScript is used for:

1. Adding interactive behavior to web pages

JavaScript allows users to interact with web pages. There are almost no limits to the things you can do with JavaScript on a web page — these are just a few examples:

  • Show or hide more information with the click of a button
  • Change the color of a button when the mouse hovers over it
  • Slide through a carousel of images on the homepage
  • Zooming in or zooming out on an image
  • Displaying a timer or count-down on a website
  • Playing audio and video in a web page
  • Displaying animations
  • Using a drop-down hamburger menu

2. Creating web and mobile apps

Developers can use various JavaScript frameworks for developing and building web and mobile apps. JavaScript frameworks are collections of JavaScript code libraries that provide developers with pre-written code to use for routine programming features and tasks — literally a framework to build websites or web applications around.

Popular JavaScript front-end frameworks include React, React Native, Angular, and Vue. Many companies use Node.js, a JavaScript runtime environment built on Google Chrome’s JavaScript V8 engine. A few famous examples include Paypal, LinkedIn, Netflix, and Uber!

3. Building web servers and developing server applications

Beyond websites and apps, developers can also use JavaScript to build simple web servers and develop the back-end infrastructure using Node.js.

4. Game development

Of course, you can also use JavaScript to create browser games. These are a great way for beginning developers to practice their JavaScript skills.

You can also use JavaScript for the following:

  • Artificial Intelligence: You can use JavaScript to work on AI-related projects. With the Tensorflow.js machine learning library, you can do AI stuff using JavaScript.
  • Embedded Systems: Node.js is famous for building server-side web applications. But one can also use it to write software that runs on embedded systems.
  • Presentations: Reveal.js, Impress.js are pretty powerful frameworks you can use to create beautiful slide decks. The advantage is that they are easy to use; so you can make something amazing in a couple of minutes.

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.

--

--