log
Write a line of text to the console output.
console.log("");
A line of text is a string that has two special characters added at the end: carriage return
and line feed. These characters are really just codes that mean start a new line.
Sometimes they appear in code as "\r\n"
.
After using ||console:log||
, any new text written to the console output will begin on a new line.
With ||console:log||
, the new line characters are automatically added for you. You only need to give the text you want to write.
Parameters
- text: the string to write to the console output.
Example
Write two greeting messages to the console output.
console.log("How are you today?");
pause(5000);
console.log("Well that's great! I'm doing well too.");