top of page
Akhil. K

JAVASCRIPT – An overview

An Introduction to Javsascript (JS):


Have you ever wondered how websites that you are browsing are very responsive and fast? Ever thought what makes the websites function so effectively? I believe that everyone would have read or heard about JavaScript.


Has anyone seen the term JavaScript in your Google settings? If so, what is JavaScript? How do website developers use this tool in developing a website?

We are here to answer all these questions and make sure that you return back with some valuable information. So, let’s start by understanding what JavaScript is.


What is JavaScript?


JavaScript is an interpreted language that “powers the web”. It is a language which is used to create and control website contents such as anything that could move or any changes on your website without reloading your website manually.


Some features like animated graphics and interactive forms require JavaScript running in the background. 

   

We all would have seen JavaScript working in our desktops or laptops or mobiles and would have taken it for granted. The easiest way of understanding JavaScript can be through the ‘cookies’ which we see when we enter a website. Cookies are a small item of data consisting name and other values of a person stored by website browsers instead of websites.


Cookies.js is a JavaScript tool which allows cookies to be created, recovered and even deleted through a simple interface. Let’s have a look at the history of JavaScript.



History of JavaScript:


History of JavaScript can be traced to the mid-1990s (1995) when Netscape Communications and Microsoft were involved in a browse war. Netscape programmer Brendon Eich founded this scripting language in just 10 days. It was originally called ‘Mocha’, then ‘LiveScript’ and later ‘JavaScript’. 


Java vs JavaScript:


There are many confusions about Java & JavaScript. Many of them think that Java & JavaScript are same, but the truth is that both are unrelated to each other. Java programming is a compiled language which is a complex language whereas JavaScript is a scripting language whose syntax has been influenced by the programming language C. Some examples for compiled programming languages are C++, Swift etc. And few of the interpreted programming languages are JavaScript, Python, Reelay etc.


There were many rumours about the name of the language. Even though there wasn’t any relation between them, how did JavaScript get its first name as Java? Many say that it was a marketing and promotional tactic used by the company to advertise the language and shift the attention from Java to JavaScript. This was the most buzzed of the time. In a recent survey conducted by Stack Overflow in 2018, it was found that JavaScript was the mostly used programming language in the world with 67.8% of developers using it.


JavaScript – How did it become popular?


JavaScript being built for Netscape’s Navigator browser potentially increased its popularity among other languages. Microsoft re-engineered the language and developed a new language called ‘Jscript’ which was a failure. Netscape won the language war even though Microsoft won the browser war. Its popularity increased eventually. The year of 2005 proved to be a big one for JavaScript. ‘Ajax’, a revolutionary suite of technologies including JavaScript was released by Jesse James Garrett. Ajax helped to improve the user experience by making websites feel more natively like the desktop apps. This even helped JavaScript to gain popularity among other languages and got recognised as a professional programming language.   


Ajax really proved to be one of the important backbones for JavaScript. At the time, JavaScript faced many challenges for which the community responded with their most popular frameworks and libraries such as JQuery, Node.JS, ReactJS etc.

What is a Framework?

A framework is a library of set of pre-written codes which helps the coders or developers from not starting their code from the scratch. A framework reduces the number of lines of code compared to the original code.

The frameworks & libraries of JavaScript:

  1. JQuery: It is a JavaScript library released in 2006, after 11 years of JavaScript’s appearance. Its main purpose is to reduce the code by removing out all the unnecessary markup and making the code smart and understandable.

  2. Angular JS: It is a JavaScript-based application released by Google in 2010. It was developed to encounter many challenges faced during developing single-page applications.

  3. React JS: It is an open source library developed by Facebook which itself claims as a framework for Javascript. It is known for its speed. It has implemented virtual document object model (DOM) structure which performs updates in its virtual memory before providing the page in browser.

  4. Vue JS: Vue JS is an open source framework written by Evan You in 2016. It is used for building user interfaces and single page applications.

Node.JS:

JS(Node) is not a framework nor a language, but a run time open source development platform for executing JavaScript code server-side. It alone has many frameworks such as:

  • Hapi.js

  • Koa.js

  • Sails.js

  • Meteor.js

  • Derby.js

  • Total.js

  • Adonis.js

  • Nest.js

  • LoopBack.js etc.

Some other JavaScript frameworks are Ember, Meteor, Mithril, Polymer etc.


Adding JavaScript to your website


Adding JavaScript for your code is very easy if you have earlier coded HTML & CSS in your websites. In fact, HTML, CSS and JavaScript are known as the powerful tools to build a website. HTML is a builder who builds the structure of the website and CSS is a painter who makes the website look colourful. And JavaScript makes the website responsive and increases the user experience.


JavaScript cannot run on its own. It is the browser which is responsible for it. We give the code to the browser, it is the browser that should run the code. 

JavaScript can be added to your website directly by using <script> tag.


Here is the code to use JavaScript:


<script type=”text/javascript”>

JavaScript code goes here……..

</script> 


JavaScript runs on any operating system such as Windows, Mac or Linux. It is also supported by all the modern browsers like Google Chrome, Internet Explorer, Firefox or any other browsers.


Learning to code is actually fun but at times it tests your capability and interests. You can build a website just by using HTML and CSS. But JavaScript gives life to your website by making it responsive. 

A simple JavaScript code:


We must place all the JavaScript code within the <script> tag which should be within <html> tags. If it is in this format, it helps the browser distinguish the JavaScript code from rest of the code.

<html>

  <head>

    <script type=”text/javascript”>

alert(“Hello, I love JavaScript”);

    </script>

  </head>

<body>

</body> </html> Summary:

  • JavaScript is a client-side scripting language developed by Brendon Eich.

  • It is different from Java. Java is a compiled programming language whereas JavaScript is an interpreted language.

  • It can be run on any browsers or operating systems (OS).

  • JavaScript has many frameworks and libraries. 

0 comments

Comments


bottom of page