I am starting a series on node js. Actually I’m not super skilled with node js. So I thought let’s start from zero again and help others with me to learn about it. I saw the ‘the net ninja’ tutorials and took the syllabus from there and make a fusion of my own. I want to help you with my journey, let’s ride together into node js for 30 days…
Day 3 — Learning Node JS In 30 Days [Mini series]
A full series to learn the basics easily of node js
Today’s topic is ‘JavaScript Engine’
Why we need JavaScript engine ?
Because computer is not smart enough to understand JavaScript without JavaScript engine
So, JavaScript engine work as a middle man to make computer understand the JavaScript
So what is the purpose of javascript engine ?
Make the javascript codes into machine/binary codes
Some JavaScript engines
- V8 by Google for Chrome(most used)
- SpiderMonkey by Mozila for Firefox
- JavascriptCore by Apple for Safari
- Chakra by Microsoft for Microsoft Edge
- Hemes engine by Facebook for Android apps
- See the full list in https://en.wikipedia.org/wiki/JavaScript_engine
What is V8 ?
V8 is an open-source JavaScript engine developed by The Chromium Project for Google Chrome and Chromium web browsers. The project’s creator is Lars Bak. The first version of the V8 engine was released at the same time as the first version of Chrome: September 2, 2008. (Wikipedia)
So how v8 works?
- We write codes
- It goes to v8
- finally v8 changes it to c++
- c++ changed into assembly language
- finally assembly to machine codes
Are you feeling tired after all these information ?
One tricky question for you then, if every company can make their own version of engine then they should not make it in their way right ? Why same JavaScript codes works on all browser in a same way ?
Tired of searching answer ?
Because everyone follow ‘ECMAScript’. This is standardized for writing JavaScript engine!
Originally it published on nerdjfpb blog and graphical version on instagram. you can connect with me in twitter, linkedin or instagram