Day 3 – Learning Node JS In 30 Days [Mini series]

Day 3 – Learning Node JS In 30 Days [Mini series]

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 Firexof
  • 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 anwser ?

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 twitterlinkedin or instagram

要查看或添加评论,请登录

Muhammad Ali的更多文章

社区洞察

其他会员也浏览了