If you are looking for a setup like the one below, the following instructions might help you configure this on your workstation.
In case you are learning DSA, you should definitely check out our free A2Z DSA Course with videos and blogs.

Follow the instructions to set up for JavaScript:
- The first step is to download VS Code. You might additionally require Node.js to run the code. If your system already has it, feel free to skip this step.
- After you finish setting up the configuration, we need to create a folder to store our files. Create a Test.js file containing your code, an input.txt file, which is what you will give, and an output.txt file, where the output of your code will be printed.
-
If you see, you will have a similar view with all three files next to each other. To create a similar view as the result,
– go to view,
– then to editor layout,
– click on split left,
This will separate the main javascript file to the left from the input and output files.
To split input and output in two sections, have your cursor on input.txt file and then follow the same steps Editor Layout -> Split Down
-
Since we have created and aligned the input and output files, we have to run these files. To make sure our input gives an output, we will have to configure it. Go to Terminal, select Configure Tasks, choose Create tasks.json file from the template, and then select others.
Terminal -> Configure Tasks -> Create tasks.json file from template -> others
-
After selecting others, you will see a new .vscode file and, in that, a tasks.json file, clear the current text in the json file and paste this.
For Mac Users
{ "version": "2.0.0", "tasks": [ { "label": "Run JavaScript with Input/Output", "type": "shell", "command": "node", "args": [ "${file}", "<", "input.txt", ">", "output.txt" ], "presentation": { "reveal": "never" }, "group": { "kind": "build", "isDefault": true }, "options": { "cwd": "${workspaceFolder}" } } ] }
For Windows Users
{ "version": "2.0.0", "tasks": [ { "label": "Run JavaScript with Input/Output", "type": "shell", "command": "node", "args": [ "${file}", "<", "input.txt", ">", "output.txt" ], "presentation": { "reveal": "never" }, "group": { "kind": "build", "isDefault": true }, "options": { "cwd": "${workspaceFolder}" } } ] }
If you are using some other OS, you can use ChatGPT to get the equivalent command. - Post writing a program in javascript, press (cmd+shift+B) for Mac and (ctrl+shift+B) for Windows to run the code and get the output. In case you are facing some issue, we recommend you to use Bard or ChatGPT to get your errors resolved.