---
title: "Discussion on \"JavaScript: Arrays vs Objects General Overview\" | Hashnode"
description: "Discussion on \"JavaScript: Arrays vs Objects General Overview\". Arrays:\nArrays  are used to store a collection of items which are of the similar type.\nlet colors = [ 'blue', 'red', 'green' ];\n// This is an array of strings\nKey Takeaways from Arrays:\n\nArrays are a special type of objects\nGood for sorting and loopi..."
url: "https://hashnode.com/posts/javascript-arrays-vs-objects-general-overview/6219b38345bf7fc41cc9b331"
---

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

Discussion

# [JavaScript: Arrays vs Objects General Overview](https://deniscabrera.dev/javascript-arrays-vs-objects-general-overview?utm_source=hashnode&utm_medium=feed)

Arrays: Arrays are used to store a collection of items which are of the similar type. let colors = \[ 'blue', 'red', 'green' \]; // This is an array of strings Key Takeaways from Arrays: Arrays are a special type of objects Good for sorting and loopi...

Feb 26, 2022 · 1 min read · deniscabrera.dev  
Read the article

-   [#javascript](https://hashnode.com/tag/javascript)
-   [#beginners](https://hashnode.com/tag/beginners)
-   [#codenewbies](https://hashnode.com/tag/codenewbies)

## Written by

[Denis Cabrera](https://hashnode.com/@denisCabrera)

@denisCabrera · Florida, US

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

Web Dev + Javascript

System Administrator switching to programming. I love all things JavaScript.

## Responses 2

Markdown supported · ⌘↵ to post

[Jorge Romero](https://hashnode.com/@JorgeRL)

[Mar 6, 2022](https://hashnode.com/posts/javascript-arrays-vs-objects-general-overview/6219b38345bf7fc41cc9b331/comment/6224d606d858116153ef1007)

One of the most fascinating things I have learned through my JavaScript journey is how to shift the way you think about these programming constructs.

It is true that objects and arrays are different and serve different purposes. Yet, there is a sense in which they are _the same thing_.

For example, you can use `Array.map(f)` to apply a function `f` to every element of the array and return the resulting array. But you can also define a similar `map()` for any data structure that could reasonably be iterated through.

It turns out that it often is very desirable to do this shift in thinking, given the current hype with functional programming (which I really like) :)

[Denis Cabrera](https://hashnode.com/@denisCabrera)

[Feb 26, 2022](https://hashnode.com/posts/javascript-arrays-vs-objects-general-overview/6219b38345bf7fc41cc9b331/comment/6219b89445bf7fc41cc9b390)

Total beginner here 😁 just trying to write about what I learn in order to get a better grasp of concepts and hopefully influence or teach someone something new.

If you see anything wrong please comment and I will gladly correct. I appreciate you. Thank you

[Jorge Romero](https://hashnode.com/@JorgeRL)

[Mar 6, 2022](https://hashnode.com/posts/javascript-arrays-vs-objects-general-overview/6219b38345bf7fc41cc9b331/comment/6219b89445bf7fc41cc9b390#reply-6224d6e0d858116153ef1051)

Keep at it [Denis Cabrera](https://hashnode.com/@denisCabrera)!

The best way of learning is by teaching! In case you are not already familiar with the Feynman technique I'll leave a link with a [nice summary from the University of Colorado](https://www.colorado.edu/artssciences-advising/resource-library/life-skills/the-feynman-technique-in-academic-coaching)

:)
