Follow these steps in VS code.[performed in windows os]
Create new file
Write javascript codes in it
Save file as filename.js
Go to Debugging menu
Click on Start debugging
or simply press F5
screenshot of starting debugging
screenshot of output of js code in terminal