Is there a way to create and run javascript in Chrome?

后端 未结 9 2216
生来不讨喜
生来不讨喜 2020-12-13 06:21

Is there a way, like an extension or application, in Chrome to create and run .js files in Chrome?

9条回答
  •  鱼传尺愫
    2020-12-13 07:03

    Try this:
    1. Install Node.js from https://nodejs.org/
    2. Place your JavaScript code into a .js file (e.g. someCode.js)
    3. Open a cmd shell (or Terminal on Mac) and use Node's Read-Eval-Print-Loop (REPL) to execute someCode.js like this:
    > node someCode.js

    Hope this helps!

提交回复
热议问题