Substitute for console.log

Console.log is fine and all, but I think Codecademy overuses it. Outside of Codecademy, what can I use as a substitute? Does text(); from processing js work?

1 Like

If you work with a website you will most probably work directly with the HTML elements, like changing some text or an image on a webpage and even show or hide certain elements like a button for example.

In the Introduction to JavaScript course you’re only working with the console and it is the easiest way to see the output of your code.

1 Like

That is one of the main problems I have with CodeAcademy. You can spend weeks, dozens of hours, learning one of their courses like JavaScript and then find out that your knowledge can’t be directly applied to any real world application because Console.Log only has relevance as an artifact of their learning system. Yes, you could use some of the logic that you displayed in Console.log to do things, but not directly. From the beginning, the time you spend in CodeAcademy should be used in a way that has direct, practical relevance outside their learning environment. I feel like when i used Code Academy I’m using the modern equivalent of a chalk board.

Have you tried using the JavaScript Console in your browser?

Yes, I think part of the frustration though is doing something where the real world projects you could show would be non existent, other than as a purely academic exercise. Can I build a thousand lines of code showing multiple forms of logic through JS using a web console? Yes, would anyone actually want that as an end product worth the time it took to write a thousand lines of code? No.

We all know how pointless that would be. Of course we would write our code in a text-editor and then test it in the console. Everyone’s workflow is different.

Once we merge JS with HTML/CSS the document becomes the test bed, but we can still inspect variables in the console. It is, after all the de facto debugging environment.

Node.js is introduced in the course and we are instructed on how to install it on our local machine. In the command line we can invoke Node to run our scripts in the shell.