Code360 powered by Coding Ninjas X Naukri.com. Code360 powered by Coding Ninjas X Naukri.com
JavaScript Introduction

Introduction to JavaScriptfooter line

 

JavaScript is a cross-platform, i.e. , used both on the client-side and server-side, object-oriented scripting language. It is primarily used for enhancing the interaction of a user with the webpage. In other words, one can make their webpage more lively and interactive with the help of JavaScript. JavaScript is also being used widely in Web development, game development etc.

 

The programs in this language are called scripts. They can be written right in a web page’s HTML and run automatically as the page loads.

 

Scripts are provided and executed as plain text. They don’t need special preparation or compilation to run.

 

In this aspect, JavaScript is very different from another language called Java.

 

 

 

History Of JavaScript 

  • JavaScript was invented by Brendan Eich in 1995 and became an ECMA standard in 1997.
  • ECMAScript is the official name of the language.
  • ECMAScript versions have been abbreviated to ES1, ES2, ES3, ES5, and ES6.
  • Since 2016 new versions are named by year (ECMAScript 2016 / 2017 / 2018).
  • Now the latest version of JavaScript, i.e. ES6, is used.

 

Features of JavaScript 

 

  •  An interpreted language
  •  Embedded within HTML
  •  Minimal Syntax - Easy to learn( C syntax and java OOC)
  •  Mainly used for client-side scripting because all browsers support it
  •  Designed for programming user events
  •  Platform Independence/ Architecture Neutral

 

Industry Use Of JavaScript

 

When JavaScript was available for server-side use, the software industry was immensely benefited from Javascript, as suggested by GitHub. Javascript was the most used language, leaving Ruby, Java, PHP, and Python behind.

 

The graph below shows the most used languages on Github, and you can easily see how much JavaScript is used in the software industry. 

 

Credits: Most Popular Programming Languages on GitHub

 

JavaScript Used By The Tech Giants 

 

  • Microsoft
    • Microsoft works closely with JavaScript to built its Edge web browser.
    • All browsers need to process and execute JavaScript efficiently, so Microsoft has developed and maintains its JavaScript engine for Edge browser.
    • Microsoft has also developed a version of NodeJS for Internet Of Things(IoT) applications. NodeJS is excellent for IoT because it’s lightweight and efficient.

 

  • Linkedin
    • LinkedIn switched from Ruby on Rails to Node.js in late 2011. 
    • It is because LinkedIn developers wanted to optimise their mobile app where everything is written entirely in Node.js.

 

  • Google
    • Google’s search results that save you from typing get there with the use of JavaScript.
    •  JavaScript powers the Gmail web client
    • Google Docs uses JavaScript too

 

  • Netflix
    • The user interface (UI) of Netflix is built using Node.js
    • It is also almost two times faster during startup as a consequence.

 

Credits: Top 10 Striking Programming Languages 2021

 

 

What Is JavaScript Used For?

 

Adding interactive behaviour to web pages

  • Add styles to Web Page.
  • Add Pop-ups to a Web page.
  • Add HTML content.
  • Add animations.
  • Add click events.

 

Creating web and mobile apps

  •  JavaScript frameworks are used for developing and building web and mobile apps.
  • Popular JavaScript front-end frameworks include React JS, React Native, Angular JS, and Vue JS.

    

Building web servers and developing server applications

  • Beyond websites and apps, JavaScript is also used to build simple web servers and develop the back-end infrastructure using Node.js.