Why print to console.log()

I imagine that this will be covered later but I have read about, watched, and now through Codeademy a lot about printing to the console. What is the purpose of printing to the console? Does this affect the interactiveness of a site, or is this just to test things?

Testing, debugging, or sometimes the program is actually meant to only be used with a console/CLI.

You can use it to see the output of things to make sure they are working. Some programs is revolving around printing things to the console such as a prime number checker.