> For the complete documentation index, see [llms.txt](https://js201.gitbook.io/js-101/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://js201.gitbook.io/js-101/console.md).

# 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:

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

### 📝 Tasks:

* [ ] Write a program to print `Hello World` on the console. Feel free to try other things as well!
* [ ] Write a program to print variables to the `console`.&#x20;
  1. Declare a variable  `animal` and assign the dragon value to it.
  2. Print the `animal` variable to the `console`.

### 💡 Hints:

* Visit the [variabl](/js-101/basics/variables.md)[e](/js-101/basics/variables.md) chapter to understand more about variables.
