All About JavaScript !!
JavaScript is a scripting language that adds functionality and behaviour to the web page. In other words, we can create any web page using HTML and CSS. But this web page will be a static one. HTML and CSS can only provide structure and style to a web page. In order to make the web page interactive and dynamic we need to add JavaScript to it.
Let’s say we have a static web page with a button in it. Now if we want to count the number of times this button is clicked. We will therefore have to add a JavaScript code that will do this for us. Adding JavaScript to the webpage makes it interactive.
As per the Stack Overflow 2021’s survey , JavaScript is the most commonly used programming language all around the world. And its not the first time that JavaScript is chosen to be the widely used programming language but it has completed its ninth year in a row.
So why is Javascript so popular?
There are tremendous factors that add to it.
1. First of all, it is very easy to learn. The creation of Javascript was done keeping in mind that the end user needs not to be a trained or a skilled developer.
2. No extra set up is required to get started with this language unlike others.
3. With the introduction of NodeJs we can do end to end programming (frontend as well as backend).
4. Rich JavaScript libraries and framework.
5. All the modern web browsers provide support for it.
6. Large and supportive community.
JavaScript has a lot more to offer than the above. Lets have a look into the details of Javascript to get some more insights of it.
History
The development of JavaScript began with a vision to provide more power to web by making it more dynamic. Something more than just HTML and CSS was the need of the time that can make browsers more lively.
JavaScript was developed in 1995 by Brendan Eich, a Netscape programmer. It is believed to be developed just in around 10 days. It was previously called Mocha, it was first renamed to LiveScript and finally to JavaScript.
During that time, Netscape ruled the world by creating the best browser in the world. But at the end of 1995, Microsoft’s Internet Explorer began to gain popularity and threatened NetScape. NetScape then teamed up with Sun to offer Microsoft a strong competition.
The main objective of this ally was to serve JavaScript as a companion to Java as Visual Basic was for C ++. The similarity of the name to Java was just a kind of marketing strategy.
Get Aanchal’s stories in your inbox
Join Medium for free to get updates from this writer.
Unfortunately, things did not go well for JavaScript as expected in the early versions. JavaScript didn’t get the eye it deserved. But few years later, it started being observed and gaining popularity.
ECMAScript and JavaScript
Slowly and gradually, JavaScript began out to grow to be one of the famous picks for developers. With the rising need for JavaScript, the Netscape programmers handed it over to ECMA (European Computer Manufacturers Association) for standardization as it required a continuous support.
The name ECMAScript was chosen to preserve it much like ECMA and JavaScript.
ECMAScript is a standard for scripting languages. It is basically a standardization guideline whereas JavaScript is its implementation.
Is JavaScript a compiled language or an interpreted language?
This is the most debated topic on the internet. So lets dive into it.
Javascript is an integrated language as it can be directly run into the browser without needing to convert it to an intermediate language.
So why do some people believe it is a compiled language?
It is because some JavaScript engines such as V8, SpiderMonkey compiles the code before execution using JIT(Just In Time) compilers to improve the performance. This creates all the ambiguity.
Since the compilers are being used rather than interpreters, most of us think that its a compiled languge.
But this is not correct. Let’s have a detailed look into why its not a compiled language.
Normally, any compiled language produces an executable that must run the code, but this is not the case with JavaScript. No intermediate code is produced here.
The compilation is done at the runtime by the engine itself and that also for the sake of enhancing the speed.
We can run the JavaScript code directly in the web browsers unlike the compiled languages such as C, C++, Java.
To sum up, the above specifications make JavaScript different from other compiled languages and closer to interpreted languages.
JavaScript is therefore an interpreted language. During the execution, whether it is compiled or interpreted depends completely on the engine.
Future of Javascript
Earlier, Javascript was primarily a client-side language that ran in the web browser, but with the introduction of Google V8 Engine and NodeJS, Javascript is also one of the most popular choices for the backend. Today there are lots of libraries and frameworks that are developed with Javascript such as Angular, ReactJs, VueJs etc.
Javascript is a native language of the Web and as it is growing day by day, there is a possibility that Javascript is the future of web development.





