---
title: "Discussion on \"How does in-built Array iterator work?\" | Hashnode"
description: "Discussion on \"How does in-built Array iterator work?\". We use [...someArray] or array.values() to get multiple values out of a array.  And we kind of know how it works - it just returns all the values from the array. Now internally, both of them uses the iterator protocol - which is already defined on ar..."
url: "https://hashnode.com/posts/how-does-in-built-array-iterator-work/5f0adaf2f80d68509e50d0ab"
---

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

Discussion

# [How does in-built Array iterator work?](https://bendtherules.hashnode.dev/how-does-in-built-array-iterator-work?utm_source=hashnode&utm_medium=feed)

We use \[...someArray\] or array.values() to get multiple values out of a array. And we kind of know how it works - it just returns all the values from the array. Now internally, both of them uses the iterator protocol - which is already defined on ar...

Jul 12, 2020 · 5 min read · bendtherules.hashnode.dev  
Updated Jul 16, 2020  
Read the article

-   [#javascript](https://hashnode.com/tag/javascript)
-   [#ecmascript](https://hashnode.com/tag/ecmascript)
-   [#array](https://hashnode.com/tag/array)

## Written by

[Abhas Bhattacharya](https://hashnode.com/@bendtherules)

@bendtherules · Bangalore

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

Typescripting

I like to build developer tools in my spare time. I have tried dabbling with ASTs, TypeScript compiler api, webpack plugins, react custom re

## Responses 1

Markdown supported · ⌘↵ to post

[Bolaji Ayodeji](https://hashnode.com/@bolajiayodeji)

[Jul 13, 2020](https://hashnode.com/posts/how-does-in-built-array-iterator-work/5f0adaf2f80d68509e50d0ab/comment/5f0c56cb1c0d706231f763cf)

Well explained, thanks for sharing this.
