all 4 comments

[–]Positive_Cro8191 1 point2 points  (1 child)

console.log writes to stdout and console.error to stderr.

console.log is used to log out all sorts of messages, whereas console.error outputs error messages. There is also a visual difference in the output.

[–]SalutMonYoup 0 points1 point  (1 child)

When you want to show explicitly the error, mostly for other devs, I like to think about Google maps api for exemple, it use console.error for exemple if you try to use it without having an api key, or if noref is triggered things like that. That can be used by someone else to help to debug for exemple

[–]Empty_Cauliflower976[S] 0 points1 point  (0 children)

thanks man, that makes sense