Question about using the word alert

I have been learning here on freecodecamp for a while now. Khan academy before here.
I have a question about using alert. (which is used in many of the books I am reading) I am wondering is it the same as using console.log. Are there benefits of one over another, and if they are the same. Or if different what are the differences and benefits

Alert and clog are extremely different.

Alert shows a little popup dialog on your browser window with the message you specify. It does not work in any other environment such as NodeJS.

Console Logging only works on the console of the browser or if you’re using NodeJS, on the console of the environment you execute it in. If you want to see the output of the console go to the developer tools and use it directly there (press F12 or Ctrl+Shift+I).


1 Like

Thank you very much for the answers. That is very helpful and appreciated.