# 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](https://js201.gitbook.io/js-101/basics/variables)[e](https://js201.gitbook.io/js-101/basics/variables) chapter to understand more about variables.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://js201.gitbook.io/js-101/console.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
