USE CASES OF JAVASCRIPT

Sangeeth Sahana D
5 min readJun 24, 2021

--

JavaScript is the universal programming language of the web. In fact, JavaScript is used by 95.2% of all websites, according to W3Techs.

Its prevalence and use across the industry factor heavily into our Web Development Bootcamp curriculum. JavaScript is not only a language that is universally used across the web, but it’s also a great avenue into the fundamentals of web development.

What is JavaScript?

In some ways, JavaScript is the programming language that made the World Wide Web what it is today.

JavaScript is a text-based programming language used both on the client-side and server-side that allows you to make web pages interactive. Where HTML and CSS are languages that give structure and style to web pages, JavaScript gives web pages interactive elements that engage a user. Common examples of JavaScript that you might use every day include the search box on Amazon, a news recap video embedded on The New York Times, or refreshing your Twitter feed.

Incorporating JavaScript improves the user experience of the web page by converting it from a static page into an interactive one. To recap, JavaScript adds behavior to web pages.

FEATURES OF JAVASCRIPT

1) DOM Manipulation

The very reason why javascript was created is DOM manipulation. During the early time, the web was purely static. It was made dynamic by the introduction of Javascript. So what can javascript do with the DOM? a lot many things like changing all the HTML elements on the page and all their attributes. It can also change the CSS of every HTML element on the page. Javascript can add new elements in the page and remove the existing ones. It can also create new HTML events. DOM manipulation changed the web.

2) Functions as First-Class Objects

Functions in javascript are objects. They can have properties and methods just like any other object. Functions can be passed as arguments in other functions. They can also be thrown as exceptions. This feature of javascript is widely popular. Functions as objects are very helpful in development.

3) Javascript as a Client-Side Language

Originally developed as a server-side, javascript is also used as a client-side language. This feature of javascript made it the primary language of the web. A developer does not need to learn different programming languages for server-side and client-side because javascript can be used as both.

4) Platform Independent

Javascript is a platform-independent language, which means it can run on Windows, Macintosh, Netscape-supported systems, and any other platform.

5) Prototype-Based Object Model

In javascript, the objects have an internal property known as the prototype. These prototypes are a reference to other objects and contain common properties across all instances of the object. Prototypes are extremely useful for developers and ease their work. This prototype-based model made javascript greatly flexible and influenced many useful libraries such as Stampit.

6) Ability to Create Functions in the Script

This is one unique and useful feature of javascript. While writing scripts of any HTML document, a developer may need functions to handle an event and other stuff, javascript provides this option also. Functions can be created in scripts using the function keyword.

7) Detecting the User’s Browser and OS

Although Javascript can run on every platform, there could be a need for browser and os specifications according to the code. Javascript is capable of detecting the user’s browser and OS.

USE CASES

Google

Google shows suggestions as you type in the search bar which is a javascript functionality.

The search engine we all know and love (or loathe) uses JavaScript for both its front- and back-end. Google has become so popular that it’s become a verb: “just Google it,” they say.

Google is Alexa’s number one ranked webpage worldwide, and — as of January 2019 — it’s estimated that more than 1.6 billion unique users visit the site each month.

YouTube

First created in 2005, the Google subsidiary is the world’s most popular video-sharing platform. YouTube has skyrocketed in popularity. It’s ranked second worldwide in terms of web traffic and has popularized the way people watch, record, and upload a video.

Facebook

The world’s most popular social media platform is written using JavaScript and quite a few other stacks. Try disabling JavaScript in your web browser and go to Facebook. The website will actually stop you from logging in because it won’t work without JavaScript. Each section of your Facebook page is a collection of independent JavaScript applications.

The company also owns Instagram, WhatsApp, Oculus, and GrokStyle.

Wikipedia

Wikipedia is the Internet’s encyclopedia based on open collaboration. The website uses a simple design, doesn’t show display ads, and is 100% free. Wikipedia is built on JavaScript, PHP, and more.

Yahoo!

Yahoo! is one of the pioneers of the Internet. Yahoo!’s homepage is a mix of a search engine, news, and email. Yahoo! uses JS, HTML5, and more.

Amazon

Amazon, the global marketplace for goods, uses JavaScript, Perl, Java, and others. Amazon as a company is the largest e-commerce marketplace in the world as measured by revenue.

THANK YOU !

--

--

No responses yet