Run JavaScript in Visual Studio Code

后端 未结 18 1056
北恋
北恋 2020-11-30 17:04

Is there a way to execute JavaScript and display the results using Visual Studio Code?

For example, a script file containing:

consol         


        
18条回答
  •  無奈伤痛
    2020-11-30 17:36

    This is the quickest way for you in my opinion;

    • Open integrated terminal on visual studio code (View > Integrated Terminal)
    • type 'node filename.js'
    • press enter

    note: node setup required. (if you have a homebrew just type 'brew install node' on terminal)

    note 2: homebrew and node highly recommended if you don't have already.

    have a nice day.

提交回复
热议问题