This question have been asked multiple times but I'm not able to understand it clearly.
As per the answers provided, JavaScript runtime means where our Javascript code is executed.
Concerning the definition of Node.js, it is an asynchronous javascript runtime, does this mean that inside Node.js Javascript is executed?
Also, does "Javascript runtime environment" mean the environment or the machine setup where Javascript code is executed?
This question have been asked multiple times but I'm not able to understand it clearly.
As per the answers provided, JavaScript runtime means where our Javascript code is executed.
Concerning the definition of Node.js, it is an asynchronous javascript runtime, does this mean that inside Node.js Javascript is executed?
Also, does "Javascript runtime environment" mean the environment or the machine setup where Javascript code is executed?
Share Improve this question edited Jun 10, 2023 at 15:27 Mehdi Charife 1,0453 gold badges10 silver badges28 bronze badges asked Mar 30, 2021 at 13:38 Siva PradhanSiva Pradhan 8611 gold badge11 silver badges29 bronze badges 2- I suggest you read this – Edwin Dalorzo Commented Mar 30, 2021 at 13:42
- Javascript is a scripting language designed to run in the browser. Nodejs provides a context (based on the V8 chrome engine) that makes it possible to run on a puter. The V8 itself is written in c++, and if I'm not wrong javascript gets transpiled into c++ code when running in nodejs. – fonzane Commented Mar 30, 2021 at 13:51
2 Answers
Reset to default 5Whether it's running inside a web browser or outside of it, the JavaScript source code that you write is first "piled" to an internal format (a data structure), and that is then "run" by the language interpreter – this is the "runtime environment." The programming that you write tells this interpreter what to do for you. All interpreted languages work in this way. With most languages there is more than one available implementation. Edwin's ment above leads to a list of the various interpreters that have been created for JavaScript.
A runtime is simply the code that is executed when your program is run. The runtime environment is similarly self explanatory, it is the environment your code is run in. For example if the Windows OS is your runtime environment you would be able to utilize all of the libraries and APIs available to a Windows application. In the context of Node.js the runtime environment allows you to execute/cross-pile JS on your puter without a browser.
Previously answered about Runtimes