Is there a way to execute JavaScript and display the results using Visual Studio Code?
For example, a script file containing:
consol
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