Is there a way to execute JavaScript and display the results using Visual Studio Code?
For example, a script file containing:
console.log('hello world');
I assume that Node.js would be needed but can't work out how to do it?
By Visual Studio Code I mean the new Code Editor from Microsoft - Not code written using Visual Studio.
There is a much easier way to run JavaScript, no configuration needed:
Run Code
, the code will run and the output will be shown in the Output Window.Besides, you could select part of the JavaScript code and run the code snippet. The extension also works with unsaved files, so you can just create a file, change it to Javascript and write code fast (for when you just need to try something quick). Very convenient!