---
title: "Discussion on \"NodeList vs HTMLCollection: What's the difference and how to use them\" | Hashnode"
description: "Discussion on \"NodeList vs HTMLCollection: What's the difference and how to use them\". As a developer, you often need to query like elements using a class or an attribute as a selector. Luckily JavaScript has several methods built in such as getElementById(), getElementByClassName(), or querySelector(). Working with these methods you w..."
url: "https://hashnode.com/posts/nodelist-vs-htmlcollection-whats-the-difference-and-how-to-use-them/62bc559400cfcdff8e4d9848"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [NodeList vs HTMLCollection: What's the difference and how to use them](https://trammellwebdev.hashnode.dev/nodelist-vs-htmlcollection-whats-the-difference-and-how-to-use-them?utm_source=hashnode&utm_medium=feed)

As a developer, you often need to query like elements using a class or an attribute as a selector. Luckily JavaScript has several methods built in such as getElementById(), getElementByClassName(), or querySelector(). Working with these methods you w...

Jun 29, 2022 · 2 min read · trammellwebdev.hashnode.dev  
Read the article

-   [#javascript](https://hashnode.com/tag/javascript)
-   [#learning](https://hashnode.com/tag/learning)
-   [#learn-coding](https://hashnode.com/tag/learn-coding)
-   [#beginners](https://hashnode.com/tag/beginners)

## Written by

[Hunter Trammell](https://hashnode.com/@trammellwebdev)

@trammellwebdev · Kansas City

  
[View profile](https://hashnode.com/@trammellwebdev)

Web Developer • Blogger • Tutor

"The largest room in the world is the room for improvement." - Unknown While I can't say where that quote originated, I can say as a Full Stack Web Developer I am constantly reminded of this ever expansive room for improvement. There are always new technologies to learn, a JavaScript method to discover, or even development tools to take advantage of. In this infinite room, how does one quench that endless thirst for knowledge? We drink until we're full — so let's crack open a cold one and dive into some Web Development concepts.

## Responses 1

Markdown supported · ⌘↵ to post

[trav](https://hashnode.com/@techsavvytravvy)

[Jun 30, 2022](https://hashnode.com/posts/nodelist-vs-htmlcollection-whats-the-difference-and-how-to-use-them/62bc559400cfcdff8e4d9848/comment/62bd05d5a5678c068452dbc1)

Thanks for this clarification! I know this has personally tripped me up a few times, especially working in TypeScript. It would be cool to see some use cases showing the advantages of each.

[Hunter Trammell](https://hashnode.com/@trammellwebdev)

[Jun 30, 2022](https://hashnode.com/posts/nodelist-vs-htmlcollection-whats-the-difference-and-how-to-use-them/62bc559400cfcdff8e4d9848/comment/62bd05d5a5678c068452dbc1#reply-62bd08aca5678c068452dc09)

Thanks for the feedback! Yeah that would be, I’ll have to write a follow up!
