• Register
100 points
7 4

Microsoft has done one amazing thing which is microsoft visual code. Microsoft visual code is  an awesome IDE (Integrated Development Environment), it provides many shortcuts, code formatting, completing code itself and many more features. And the best part is we can modify it. 
We can code in  any text editor like notepad but we cannot run our in notepad. This article discusses how to run Javascript code in Microsoft Visual Code.
 

How to run Javascript in VS code?

As we know VS Code has many features and one of them is its huge extension support.  We will run Javascript in VS Code via an extension from the marketplace. The extension we need for running javascript in VS Code is CODE RUNNER.

Steps

  1. Open VS Code and go to Marketplace.
  2. Search for code runner by Jun Han.
  3. Hit install and wait for a few seconds.
  4. After the installation is done, reload VS Code.
  5. Open your code and hit ctrl + alt + N
  6. Now your code is running in VS Code.

Code runner will show the output of your program. Running code in VS Code will help you test your code faster. Since, now  we can test code in  VS Code and we don't have to open the browser's console.
Hope this will help.
 

100 points
7 4