How do you show the console log in Visual Studio Code with JavaScript?

I am just starting out on learning JavaScript and I made flashcards for the lessons that I have previously done. I wanted to open Visual Studio code and test myself. However unlike Codeacademys online terminal I can’t seem to figure out how to get console.log() to show up anywhere.

All I want to do is make sure that the code I am typing in is working correctly. I don’t want too be stuck using the Online terminal that CodeAcademy has for the lessons but I am frustrated beyond belief right now as I don’t know what to do. I am beginner so it is probably something simple but I can’t for the life of me figure it out.

1 Like

Make sure you have node installed. Enable view of the Terminal and Debug Console (go to the View menu and select Terminal). You can press F5 for Debugging or Ctrl-F5 for Run without debugging. When you get a menu asking for environment, select Node.js. You should see output in the Debug Console.

Or you can type in the terminal window inside of VS Code (for example: node helloworld.js). Then you would get output in the Terminal window.

1 Like

Thank you! This helped quite a bit!

1 Like