Why console.log? Isn't Confirm command or Alert better for user?



Hi Codecademy,

I'm trying with my students your Javascript course. It is very nice. But I have this question:

In Unit 1, Lesson "Code Your Own Adventure", in Lesson 1 and 2 ("Confirm", ,"Old enough to play") you use Confirm command. It's fine. But later in Lesson 3 ("Adding some story") you write:

"Print the introduction using console.log. Remember that the introduction is a string, so make sure to keep it between quotes."

But I think user can't normally see texts from console.log command. Maybe is better use Confirm command or Alert? Is it some mistake with console.log there?

Than you.

Josef Svoboda


That is how I understand it.
console.log and confirm/alert belong to two different "categories".
They have their own use cases
The idea is that the user interface should be kept as tidy as possible.
When I code there is very often the need to print sth out, to check if everything is working as it should.
When I ma working with .js I use console.log, because it is clean, fast and versataile. But mostimoportant the ui stays intact and I don't have these pop-up that I have to close. And if there are collaborators on the project they will thank you to.


This post was flagged by the community and is temporarily hidden.


Thank you. I understand. I don't know why is written on codecademy that the user has to use console.log...


This post was flagged by the community and is temporarily hidden.