-
Engine: The JavaScript engine translates your script into runnable machine code instructions so it can be executed by the CPU of the
target
machine. The engine translates scripts atruntime on the fly
, So, your code won’t be compiled unless you run it. So, A JavaScript engine is a computer program that executes JavaScript (JS) code. SinceECMAScript (ES)
is thestandardized specification
of JavaScript,ECMAScript engine
is another name for these engines.JS EngineHere is the List of Engines:
JS enviroment and engine-
Chrome V8
: From GoogleUsed In: Used in Chrome Browser, NodeJS & in android based mobiles
-
SpiderMonkey
: From MozillaUsed In: Used in Firefox Browser
-
Nitro / JavascriptCore
: From AppleUsed In: Used in Safari Browser & in iOS based mobiles
-
Chakra & CharkraCore
: From MicrosoftUsed In: Used in Microsoft Edge Browser
-
-
Enviroment: The JavaScript engine works inside an environment. It provides additional features with utility libraries
which are not part of the language
that can be used during execution. These can be utility libraries orAPIs which allow communicating
with the world surrounding theengine
. Engine vs RuntimeHere is a list of Runtime Environments
:-
Browser
: Provides DOM API, Fetch API, Timer(setTimeout & setInterval), Storage(like Local Storage) etc.Example: Chrome, Firefox, Safari, Opera, Edge etc
-
Server Environment
: Provides File System Access, Network Access, Console etc.Example: NodeJS, Deno
-
Desktop Environment
: Provides GUI API, File System Access, Network Access, Console etc.Example: Electron etc.
-
Mobile Environment
:Example: NativeScript, Ionic, PhoneGap, React Native etc
-