---
title: "Discussion on \"Array Flatten in JavaScript\" | Hashnode"
description: "Discussion on \"Array Flatten in JavaScript\". Learn how to flatten nested arrays in JavaScript: use flat() and flat(Infinity), and write your own recursive flatten, a common interview question."
url: "https://hashnode.com/posts/flatten-array-in-javascript/6aa666e05b7c41bf0e378b5e"
---

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

Discussion

# [Array Flatten in JavaScript](https://ayushjjainn.hashnode.dev/flatten-array-in-javascript?utm_source=hashnode&utm_medium=feed)

Learn how to flatten nested arrays in JavaScript: use flat() and flat(Infinity), and write your own recursive flatten, a common interview question.

Sep 13 · 8 min read · ayushjjainn.hashnode.dev  
Read the article

-   [#developer](https://hashnode.com/tag/developer)
-   [#programming-blogs](https://hashnode.com/tag/programming-blogs)
-   [#javascript](https://hashnode.com/tag/javascript)
-   [#nodejs](https://hashnode.com/tag/nodejs)
-   [#nodejs-developer](https://hashnode.com/tag/nodejs-developer)
-   [#array-flatten-in-javascript](https://hashnode.com/tag/array-flatten-in-javascript)
-   [#methods-in-js](https://hashnode.com/tag/methods-in-js)
-   [#web-development](https://hashnode.com/tag/web-development)
-   [#webdev](https://hashnode.com/tag/webdev)
-   [#technology](https://hashnode.com/tag/technology)
-   [#software-development](https://hashnode.com/tag/software-development)
-   [#interview](https://hashnode.com/tag/interview)

## Written by

[Ayush Jain](https://hashnode.com/@ayushjjainn)

@ayushjjainn · Jaipur, RJ

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

Building cool things for the internet

I like making things with code. This is where I share my projects and the bugs I ran into.

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
