Run JavaScript in Visual Studio Code

后端 未结 18 1060
北恋
北恋 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:41

    I faced this exact problem, when i first start to use VS Code with extension Code Runner

    The things you need to do is set the node.js path in User Settings

    You need to set the Path as you Install it in your Windows Machine.

    For mine It was \"C:\\Program Files\\nodejs\\node.exe\"

    As I have a Space in my File Directory Name

    See this Image below. I failed to run the code at first cause i made a mistake in the Path Name

    Hope this will help you.

    And ofcourse, Your Question helped me, as i was also come here to get a help to run JS in my VS CODE

提交回复
热议问题