什么是 javascript 运行时..?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/30838412/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-23 05:49:16  来源:igfitidea点击:

What is javascript runtime..?

javascriptnode.jsweb

提问by Yamini

As per the definition mentioned on https://nodejs.org/

根据https://nodejs.org/ 上提到的定义

Node.js is a platform built on Chrome's JavaScript run-timefor easily building fast, scalable network applications. Node.js uses an event-driven, non-blocking I/O model that makes it lightweight and efficient, perfect for data-intensive real-time applications that run across distributed devices.

Node.js 是一个基于 Chrome 的JavaScript 运行时构建的平台,用于轻松构建快速、可扩展的网络应用程序。Node.js 使用事件驱动的非阻塞 I/O 模型,使其轻量级和高效,非常适合跨分布式设备运行的数据密集型实时应用程序。

Can any one please help me understand what the JavaScript run-timeexactly means?

任何人都可以帮助我理解JavaScript 运行时的确切含义吗?

回答by Mustaghees

Maybe it's referring to Google's V8engine.

也许它指的是谷歌的 V8引擎。

  • It is an engine for processing JavaScript in the browser and is used by Google Chrome.
  • It's open source.
  • And it's written in C++.
  • It works on several platforms including mobile and embedded devices.
  • 它是在浏览器中处理 JavaScript 的引擎,被 Google Chrome 使用。
  • 它是开源的。
  • 它是用 C++ 编写的。
  • 它适用于多种平台,包括移动和嵌入式设备。

For more information see: https://code.google.com/p/v8/

有关更多信息,请参阅:https: //code.google.com/p/v8/

If you google for "chrome javascript runtime", you will get all these links to V8.

如果您在 google 上搜索“ chrome javascript runtime”,您将获得所有这些指向 V8 的链接。

回答by Akshat Goel

Chrome's javascript runtime is Google's V8 engine which was developed by Google to be used with Google Chrome.

Chrome 的 javascript 运行时是谷歌的 V8 引擎,由谷歌开发,用于谷歌浏览器。

It compiles the javascript code to native machine code instead of interpreting bytecode which gives a major performance boost to javascript (which is traditionally very slow compared to other high level languages).

它将 javascript 代码编译为本地机器代码,而不是解释字节码,这大大提高了 javascript 的性能(与其他高级语言相比,这在传统上非常慢)。

Node.js contains libuv to handle asynchronous events. V8 provides the run-time for JavaScript.

Node.js 包含用于处理异步事件的 libuv。V8 为 JavaScript 提供了运行时。

回答by alfin situngkir

The JavaScript Runtime (JsRT) APIs provide a way for desktop, Windows Store, and server-side applications running on the Windows operating system to add scripting capabilities to an app by using the standards-based Chakra JavaScript engine that is also utilized by Microsoft Edge and Internet Explorer. These APIs are available on Windows 10 and any version of the Windows operating system that has Internet Explorer version 11.0 installed on the machine.

JavaScript 运行时 (JsRT) API 为在 Windows 操作系统上运行的桌面、Windows 应用商店和服务器端应用程序提供了一种方法,可以使用 Microsoft Edge 也使用的基于标准的 Chakra JavaScript 引擎向应用程序添加脚本功能和 Internet Explorer。这些 API 可用于 Windows 10 和机器上安装了 Internet Explorer 11.0 版的任何版本的 Windows 操作系统。

回答by Identity1

It is a virtual machine which interprets and executes JavaScript mostly on browser. In fact Node.js is a javascript runtime based library.

它是一个虚拟机,主要在浏览器上解释和执行 JavaScript。事实上,Node.js 是一个基于 javascript 运行时的库。