The console.log() command is used to print, or log, text to the console. Consider the following example:
In this example code above, Hello! is logged to the console. Notice, we denote the end of the line with a semicolon. Although your code will usually run as intended without a semicolon, it is best practice to always include one to ensure your code works as expected in situations when it does need one.
You’ll see in the next exercise that you can put any data type inside the parentheses to print it to the console.