'What does an array variable store in JavaScript'

Опубликовано: 27 Июль 2025
на канале: Backbencher Coder
17
1

Solve the quiz with backbencherCoder015


❓**Question**:

*"What does an array variable store in JavaScript?"*

✅ **Correct Answer**:

*B: Value address*

---

💡 Explanation:

In JavaScript:

Arrays are *non-primitive* (reference) types.
So when you do:

```js
let arr = [1, 2, 3];
```

`arr` *does not store* the actual array content.
It stores the *memory reference (address)* pointing to the actual array stored somewhere in memory.

---

🔍 Let's Review the Options:

| Option | Text | ✅ / ❌ | Why? |
| ------ | --------------------- | ----- | --------------------------------------------------------------------------- |
| A | Value of the variable | ❌ | Confusing wording; variables don’t store "value of variable" — tautology. |
| B | *Value address* | ✅ | Correct! Array variable holds *address (reference)* to the array. |
| C | Value of array | ❌ | Incorrect; that’s what you'd expect, but JS stores a *reference* instead. |
| D | Index of array | ❌ | Totally incorrect — variables don’t store any index info themselves. |

‪@BackbencherCoder015‬


На этой странице сайта вы можете посмотреть видео онлайн 'What does an array variable store in JavaScript' длительностью часов минут секунд в хорошем качестве, которое загрузил пользователь Backbencher Coder 27 Июль 2025, поделитесь ссылкой с друзьями и знакомыми, на youtube это видео уже посмотрели 17 раз и оно понравилось 1 зрителям. Приятного просмотра!