Questions about testing code setup

I’m very new to programming but decided to try to learn Javascript while stuck at home. After going through the first few lessons I got to the point where Codecademy teaches you how to set up your computer to code. I’m using the terminal on my mac with VS Code and I feel like I have a basic understanding of how those two work together. I’m very confused with how testing my code works and how to set it up on my computer, though.
https://www.codecademy.com/paths/create-a-back-end-app-with-javascript/tracks/bapi-javascript-conditionals-and-functions/modules/developing-javascript-apps-locally/articles/bapi-reading-test-output
This article was provided along with a few others, but none have any in depth information on how to actually test my code. I was hoping someone might be able to point me to more resources to learn how to be able to test my code. Thanks for any help.