All About “JAVASCRIPT”

Shubham kumar
5 min readJun 25, 2021

What is JS?

According to Wikipedia: —
JavaScript
often abbreviated as JS, is a programming language that conforms to the ECMAScript specification. JavaScript is high-level, often just-in-time compiled, and multi-paradigm. It has curly-bracket syntax, dynamic typing, prototype-based object orientation, and first-class functions.
In simple ways:-
JavaScript is the Programming Language for the Web.
JavaScript can update and change both HTML and CSS.
JavaScript can calculate, manipulate and validate data.

Role of JS in website:-

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.

Where JS is used?

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, Linked In, 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.

Why JS?

  1. JavaScript is the most popular language
    According to StackOverflow, → Unsurprisingly, for the eighth year in a row, JavaScript has maintained its stronghold as the most commonly used programming language.
  2. There’s a low threshold to get started
    JavaScript is the language that browsers use. It’s easy to get started with and to understand. You can get going right away — unlike other languages, you don’t have to install a bunch of programs before you can even begin.
  3. JavaScript is a fun, interactive language
    You have a full user interface to play with right away — JavaScript has a graphical UI that’s fun and easy to manipulate. You can write code that will run in your browser, so you can build interactive projects earlier on in the learning process.
  4. Strong support for learning
    Every browser comes with source code viewing features that let you learn from other people’s live code. Plus, JavaScript has the largest and most active repository of library code in the world. People in the JavaScript community are very active and supportive in sharing and making use of each other’s code — JavaScript has a large community on StackOverflow and over 3,600 JavaScript Meetup groups worldwide. Beginners, don’t be shy — you can share your code too!
  5. Great debugging tools for learning
    An interactive JavaScript interpreter is built right into the browser, allowing you to experiment and get instantaneous feedback, which helps you learn faster.
  6. It’s a great foundational language for learning more powerful programming styles
    JavaScript comes out of the box with support for the event-driven programming style, where the flow of your code is controlled by user events or system events. This style of programming is absolutely necessary for building user interfaces and is also a very helpful paradigm for designing scalable server-side systems.
    JavaScript is intuitive for a beginner just learning to code and a great vehicle to teach students the principles of Computer Science. Once you really understand at a deep level how JavaScript works, you become quite capable of picking up other languages.
    Whether you’re planning on eventually being a front-end or back-end developer, there’s no doubt that JavaScript is the best coding language to learn for beginners.

Companies using JS:-

PAYPAL — BETTER PERFORMANCE THANKS TO NODE.JS

If I assume that you’ve used PayPal at least once, I can probably be fairly sure I’m not wrong. With its flabbergasting $451bln in annual payment volume and 244 million active worldwide users, PayPal made a decision to migrate from Java to JavaScript and Node.js back in 2013. This resulted in 200ms faster page response time and doubled the number of requests they could handle per second.

NETFLIX — HOW NODE.JS REDUCED STARTUP TIME

I believe this one does not require an introduction. Netflix has reached 130 million subscribers in June 2018 and requires an extremely scalable solution to handle all the requests and approx. 1 billion hours of weekly video data streaming.

When it comes to reasons why the decision to switch from Java on the backend to Node.js, there are a few of them. Netflix team wanted to have the same language both on the back and frontend side of their product (their frontend was already written in JavaScript), build a single page, and, what’s very important, decrease its startup time. Thanks to Node’s performance, they have managed to go from 40 minutes to under 1 minute. Quite impressive, don’t you think?

The list is very long almost every companies use javascript in direct or indirect way.

--

--