Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions code-snippets/dom-events.md
Original file line number Diff line number Diff line change
Expand Up @@ -468,5 +468,43 @@
</p>
</details>

</li>

---

<li>

**What will be the output ?**

```HTML
<div>
<div class="number-box">1</div>
<div class="number-box">2</div>
<div class="number-box">3</div>
<div class="number-box">4</div>
</div>
<script>
const arr = document.querySelectorAll('.number-box');
console.log(arr);
</script>
```

- A: `array of length 4`
- B: `undefined`
- C: `NodeList of length 4`
- D: `empty array`
- E: `empty NodeList`

<br/>

<details>
<summary><b>Answer</b></summary>
<p>

#### Option: C

</p>
</details>

</li>
</ol>