-e, --eval "script"

将以下参数作为 JavaScript 评估。 交互式解释器中预定义的模块也可以在 script 中使用。

在 Windows 上,使用 cmd.exe 单引号将无法正常工作,因为它只能识别双 " 进行引用。 在 Powershell 或 Git bash 中,'" 都可用。

Evaluate the following argument as JavaScript. The modules which are predefined in the REPL can also be used in script.

On Windows, using cmd.exe a single quote will not work correctly because it only recognizes double " for quoting. In Powershell or Git bash, both ' and " are usable.