Exercises

In JavaScript, we use console.log() to write a message (the content of a variable, a given string, etc.) in console. It is mainly used for debugging purposes, ideally to leave a trace of the content of variables during the execution of a program.

Example:

console.log("Welcome to Learn JavaScript Beginners Edition");
let age = 30;
console.log(age);

📝 Tasks:

💡 Hints:

  • Visit the variable chapter to understand more about variables.

Last updated

Was this helpful?