@ -11,6 +11,7 @@ In this second quest of our adventure, you are going to power up with JavaScript
**Exploratory Questions Technique:**
**Exploratory Questions Technique:**
This type of prompt encourages the AI to provide various explanations and examples, helping you explore different aspects of a concept.
This type of prompt encourages the AI to provide various explanations and examples, helping you explore different aspects of a concept.
> Find the examples across the subject ;)
> Find the examples across the subject ;)
### Directions
### Directions
@ -30,7 +31,7 @@ _Now that's a lot of parts!_
An `identifier` is used to define what it is, using this syntax:
An `identifier` is used to define what it is, using this syntax:
```js
```js
let robotParts = 20
let robotParts = 20;
```
```
> π± Woa, what's all this?!
> π± Woa, what's all this?!
@ -68,29 +69,29 @@ let robotParts = 20 // Just right
```
```
#### **Prompt example**:
#### **Prompt example**:
> "Explain how to use `let` to declare variables in JavaScript."
> "Explain how to use `let` to declare variables in JavaScript."
### Operator: `=`
### Operator: `=`
The special character `=` is an **operator**, like in math, they are used to define specific operations. In this case, `=` defines the `assignment` operation. It means assigning a value to our variable. This is what **links** the chosen `identifier` with our `value`.
The special character `=` is an **operator**, like in math, they are used to define specific operations. In this case, `=` defines the `assignment` operation. It means assigning a value to our variable. This is what **links** the chosen `identifier` with our `value`.
#### ```Prompt example```:
#### `Prompt example`:
"Why do we use camelCase for variable names in JavaScript?"
"Why do we use camelCase for variable names in JavaScript?"
### Value
### Value
Lastly, a value, like the one you already know: `string`, `number`, and `boolean`.
Lastly, a value, like the one you already know: `string`, `number`, and `boolean`.Full example with descriptive comments:
Full example with descriptive comments:
```js
```js
// β keyword β assignation operator
// β keyword β assignation operator
let comicBookTitle = 'Tintin in Tibet'
let comicBookTitle = "Tintin in Tibet";
// β identifier β the value (here a string)
// β identifier β the value (here a string)
```
```
#### **Prompt example**:
#### **Prompt example**:
"As a beginner, what types of values can I assign to a variable in JavaScript?"
"As a beginner, what types of values can I assign to a variable in JavaScript?"
### Instructions
### Instructions
@ -101,10 +102,9 @@ Declare two variables:
- Use the identifier `seventySeven` with the value being a string of the number 77
- Use the identifier `seventySeven` with the value being a string of the number 77
```js
```js
let seven = "7"
let seven = "7";
let seventySeven = "77"
let seventySeven = "77";
```
```
---
---
> "When we first begin fighting for our dreams, we have no experience and make many mistakes. The secret of life, though, is to fall seven times and get up eight times." β Paulo Coelho
> "When we first begin fighting for our dreams, we have no experience and make many mistakes. The secret of life, though, is to fall seven times and get up eight times." β Paulo Coelho