How JavaScript Works?
Posted by Superadmin on May 01 2023 04:08:39

How JavaScript Works?

By Priya PedamkarPriya Pedamkar
  

How JavaScript Works

Introduction to How JavaScript Works?

JavaScript is a scripting language that is used within the browser for interface interaction. Brendan Eich was the first person to create JavaScript engine was for the Netspace Navigator web browser at Netspace. It is implemented in C and its code name was SpiderMonkey. Mocha was the name given to the project initially, then renamed to LiveScript and finally when Netspace and Sun did license agreement it was again renamed to JavaScript. In this topic, we are going to learn about how javascript works. We must have heard about popular engines like V8, Spider Monkey and there are many others. Different engines have different “codenames”, for example:

The engine used for javascript consists of two main components:

NOTE:

JavaScript, a single-threaded programming language, which means it has a single Call Stack and thus it has the ability to do one thing at a time. The Call Stack is basically a data structure that records the point in the program which is actually executing. This call stack is similar to other stacks having the basic functionality like, if we step into a function, we put it on the top of the stack. We have to pop off the top of the stack if we want to return from a function. This is the basic functionality of every stack. As we are discussing the engines which drive the JavaScript functions are really complicated but the basic things which every engine performs in the broader sense are as follows:

What can in-browser JavaScript works do?

What CAN’T in-browser JavaScript works do?

JavaScript’s abilities are somewhat limited within the browser are limited for the sake of the user’s safety. The aim is to prevent some third-party webpage from accessing private information or harming the user’s data. Some scenarios for this kind of limited access are:

What makes JavaScript work unique?

Limitations

Among the many advantages JavaScript has some limitations also which are given below:

Conclusion

So with that, we all came to know that about some basic information about the evolutions of JavaScript works, some of the famous engines which run JavaScript on web browsers, what are the advantages of keeping JavaScript inside the browsers, and what could happen if JavaScript could be placed and run outside the browsers. We have also come across some of the features of JavaScript work which made it usable and unique along with some of the limitations/disadvantages of it. So with that, I am concluding the topic on how javascript works, there are many more things to explore which you could explore from the web.