Are 'print' and 'log to the console' the same?

Hello!

In projects, we are asked to print or we are asked to log to the console. Do they mean the same thing?

print will just print text to console. Console records it for later uses and such.

@aditi7887533512 Thanks for your reply! That’s very helpful. And how would I print to the console? I’ve googled it but all the search returns are about console.log.

Is this in the context of JavaScript?

It is typical to talk about “logging to the console” in JavaScript because the language uses console.log() to print messages to the console. This is the equivalent to other languages like Python and C++ printing to the terminal.

With JavaScript we don’t usually talk about “printing” things because JavaScript is mostly involved with websites and it would be confusing to think about printing messages that don’t show in the site. for example.

Hi, yes it’s about JS. In the instructions for projects on here, print is often used.

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.