Please Subscribe Youtube| Like Facebook | Follow Twitter
Setting up Visual Studio Code on Windows
- Download the Visual Studio Code installer from the official website.
- Run the installer and follow the instructions to install Visual Studio Code on your system.
Setting up Visual Studio Code on Linux
- Download the Visual Studio Code package for your Linux distribution from the official website.
- Install the package by following the instructions for your distribution. For example, if you are using Ubuntu, you can install the package using the following command:
sudo dpkg -i <package-name>.deb
- Launch Visual Studio Code and create a new file by clicking on “File” and selecting “New File”.
- Type the following code in the editor:
- Save the file with a “.js” extension by clicking on “File” and selecting “Save As”. Choose a file name and save the file with the “.js” extension.
- Open a terminal or command prompt and navigate to the directory where you saved the file.
- Type the following command to run the program:
For example, if you saved the file as “hello.js”, you would run the program using the following command:
After running command “Hello World!” will be printed