What is the difference between JavaScript Engine and JavaScript Runtime Environment

后端 未结 4 2051
隐瞒了意图╮
隐瞒了意图╮ 2020-12-07 09:18

I\'m feeling a bit confused, could someone help to describe What is the difference between JavaScript Engine and JavaScript Runtime Environment. BTW, Event Loop was impleme

4条回答
  •  悲哀的现实
    2020-12-07 09:43

    Javascript Runtime Environment


    1. Provide various features/API's to build Javascript based software.
    2. It also includes a JS Engine(Interpreter + JIT compiler(for optimization purpose)).

    Here is the 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

    NOTE: Event Loop is implemented in Runtime Environment



    Javascript Engine(Interpreter/JIT compiler(for optimization purpose))


    1. Converts your Javascript code into machine language/code so that your computer(CPU) will execute it :)

    Here is the List of Engines

    • Chrome V8 : From Google

    Used In: Used in Chrome Browser, NodeJS & in android based mobiles

    • SpiderMonkey : From Mozilla

    Used In: Used in Firefox Browser

    • Nitro / JavascriptCore : From Apple

    Used In: Used in Safari Browser & in iOS based mobiles

    • Chakra & CharkraCore : From Microsoft

    Used In: Used in Microsoft Edge Browser



    Excellent Link for More Infomation

提交回复
热议问题