fix(curriculum): update last question for let and const lecture (#58694)

This commit is contained in:
Noella Marie Chartine Uwase
2025-02-10 21:59:59 +00:00
committed by GitHub
parent 65b563607c
commit 81dd64c1bb

View File

@@ -50,35 +50,43 @@ Think about what `const` stands for.
## --text--
Which scenario is best suited for using `let` instead of `const`?
Which of the following is the correct way to assign the number `100` to a constant named `maxScore`?
## --answers--
When you need to declare a configuration value that shouldn't change.
```js
const maxScore === 100;
```
### --feedback--
Think about when you'd want to update a variable's value.
Refer to the end of the video where this was discussed.
---
When you want to track a value that will change during program execution.
```js
const maxScore = 100;
```
---
When you want to declare a variable but don't want it to be accessible in a specific block of code.
```js
const maxScore <= 100;
```
### --feedback--
Think about when you'd want to update a variable's value.
Refer to the end of the video where this was discussed.
---
When you want to declare a function.
```js
const maxScore == 100;
```
### --feedback--
Think about when you'd want to update a variable's value.
Refer to the end of the video where this was discussed.
## --video-solution--