In: Computer Science
How do I run javscript console on Visual Studio code?
Please give exact detail for thumbs up. I just downloaded VS code.
If you want to run the javascript code on visual studio you need the following applications
1.visual studio
2.node.js
download and install the above two application fromthe web.
while installing visual studio, add the option boxes...
After installing visual studio and node.js applications, follow the steps to run the javascript code
1. open visual studio,add folder and create a javascript file with .js extension
2. I created first.js with a simple code
console.log("Hello guys.I.m ready to start"); and save the code
3. Now we need to run the code
we can run the code in two ways
either in visual studio terminal or in our computer command line cmd
a. in the top of the visual studio we find an option called Terminal, click on it and click on new terminal
A new terminal open in the bottom of the visul studio
now we need to check weather node.js installed or not
enter node -v and enter it will show version of node.js like v12.19.0(remember if it shows error means node.js is not installed)
==> now set the directory of the first.js containing folder in visual studio terminal and enter
node first.py
It shows Hello guys.I.m ready to start
2. Same as visual studio terminal, you can check version of node, set the directory of the javascript containing folder, and enter node first.js
This is how you can easily run the javascript code on visual studio and command prompt
If you need any extra info, kindly comment me..